isSubclassOf Function
Check if class subclass
is superclass
or extends from superclass
isSubclassOf<SuperClass extends (...: any[]) => any, NonSubClass extends (...: any[]) => any, SubClass extends (..._: any[]) => InstanceType<SuperClass>>(subclass: SuperClass | NonSubClass | SubClass, superclass: SuperClass): subclass is SuperClass | SubClass
@note The constructors of all types must be public
.
@returns whether subclass
is a subclass of superclass
Parameter | Type | Description |
---|---|---|
subclass | SuperClass | NonSubClass | SubClass | the class that may be a subclass of superclass . |
superclass | SuperClass | the class that may be a base class of subclass . |
Returns - subclass is SuperClass | SubClass
whether subclass
is a subclass of superclass
Defined in
- core/bentley/src/ClassUtils.ts Line 31
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.