isProperSubclassOf Function
Check if class subclass
is a different class from superclass
but extends from superclass
isProperSubclassOf<SuperClass extends (...: any[]) => any, NonSubClass extends (...: any[]) => any, SubClass extends (..._: any[]) => InstanceType<SuperClass>>(subclass: NonSubClass | SubClass, superclass: SuperClass): subclass is SubClass
@note The constructors of all types must be public
.
@returns whether subclass
is a proper subclass of superclass
Parameter | Type | Description |
---|---|---|
subclass | 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 SubClass
whether subclass
is a proper subclass of superclass
Defined in
- core/bentley/src/ClassUtils.ts Line 16
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.