Type.isImplementedBy Method

Determines whether an instance implements an interface.

var isImplementedVar = aType.isImplementedBy(typeInstanceVar);

typeInstanceVar

The instance on which the interface is tested.

true if typeInstanceVar implements the interface; false if typeInstanceVar does not implement the interface, or if it is undefined or null.

Use the isImplementedBy method to determine whether an instance implements a specific interface.

Show: