Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/api-extractor-model > Parameter

Parameter class

Represents a named parameter for a function-like declaration.

Signature:

export declare class Parameter 

Remarks

Parameter represents a TypeScript declaration such as x: number in this example:

export function add(x: number, y: number): number {
return x + y;
}

Parameter objects belong to the ApiParameterListMixin.parameters collection.

Constructors

ConstructorModifiersDescription
(constructor)(options)Constructs a new instance of the Parameter class

Properties

PropertyModifiersTypeDescription
isOptionalbooleanWhether the parameter is optional.
namestringThe parameter name.
parameterTypeExcerptreadonlyExcerptAn Excerpt that describes the type of the parameter.
tsdocParamBlockreadonlytsdoc.DocParamBlock | undefinedReturns the @param documentation for this parameter, if present.