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 collection.

Constructors

Constructor Modifiers Description
(constructor)(options)   Constructs a new instance of the TypeParameter class

Properties

Property Modifiers Type Description
constraintExcerpt   Excerpt An Excerpt that describes the base constraint of the type parameter.
defaultTypeExcerpt   Excerpt An Excerpt that describes the default type of the type parameter.
name   string The parameter name.
tsdocTypeParamBlock   tsdoc.DocParamBlock | undefined Returns the @typeParam documentation for this parameter, if present.