Home > @microsoft/api-extractor-model > ApiInitializerMixin > isBaseClassOf
ApiInitializerMixin.isBaseClassOf() function
A type guard that tests whether the specified ApiItem subclass extends the ApiInitializerMixin mixin.
Signature:
function isBaseClassOf(apiItem: ApiItem): apiItem is ApiInitializerMixin;
Parameters
| Parameter | Type | Description |
|---|---|---|
| apiItem | ApiItem |
Returns:
apiItem is ApiInitializerMixin
Remarks
The JavaScript instanceof operator cannot be used to test for mixin inheritance, because each invocation of the mixin function produces a different subclass. (This could be mitigated by Symbol.hasInstance, however the TypeScript type system cannot invoke a runtime test.)