Home > @microsoft/api-extractor-model > TypeParameter
TypeParameter class
Represents a named type parameter for a generic declaration.
Signature:
export declare class TypeParameter
Remarks
TypeParameter represents a TypeScript declaration such as T in this example:
interface IIdentifier {
getCode(): string;
}
class BarCode implements IIdentifier {
private _value: number;
public getCode(): string { return this._value.toString(); }
}
class Book<TIdentifier extends IIdentifier = BarCode> {
public identifier: TIdentifier;
}
TypeParameter objects belong to the ApiTypeParameterListMixin.typeParameters collection.
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| An Excerpt that describes the base constraint of the type parameter. | ||
| An Excerpt that describes the default type of the type parameter. | ||
boolean | Whether the type parameter is optional. True IFF there exists a | ||
string | The parameter name. | ||
| tsdoc.DocParamBlock | undefined | Returns the |