Home > @microsoft/api-extractor-model > ApiItem
ApiItem class
The abstract base class for all members of an ApiModel object.
Signature:
export declare class ApiItem
Remarks
This is part of the ApiModel hierarchy of classes, which are serializable representations of API declarations.
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| DeclarationReference | (BETA) Warning: This API is used internally by API extractor but is not yet ready for general usage. | |
| string | Returns a string key that can be used to efficiently retrieve an | |
| string | Returns a name for this object that can be used in diagnostic messages, for example. | |
| Identifies the subclass of the | ||
| ReadonlyArray<ApiItem> | This property supports a visitor pattern for walking the tree. For items with ApiItemContainerMixin, it returns the contained items, sorted alphabetically. Otherwise it returns an empty array. | |
| ApiItem | undefined | If this item was added to a ApiItemContainerMixin item, then this returns the container item. If this is an Parameter that was added to a method or function, then this returns the function item. Otherwise, it returns undefined. |
Methods
Method | Modifiers | Description |
|---|---|---|
| Builds the cached object used by the | |
| ||
If this item is an ApiModel or has an ApiModel as one of its parents, then that object is returned. Otherwise undefined is returned. | ||
If this item is an ApiPackage or has an ApiPackage as one of its parents, then that object is returned. Otherwise undefined is returned. | ||
Returns the chain of ancestors, starting from the root of the tree, and ending with the this item. | ||
If this item has a name (i.e. extends | ||
This returns a scoped name such as | ||
A text string whose value determines the sort order that is automatically applied by the ApiItemContainerMixin class. | ||
| ||