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

Constructor

Modifiers

Description

(constructor)(options)

Constructs a new instance of the Parameter class

Properties

Property

Modifiers

Type

Description

isOptional

boolean

Whether the parameter is optional.

name

string

The parameter name.

parameterTypeExcerpt

readonly

Excerpt

An Excerpt that describes the type of the parameter.

tsdocParamBlock

readonly

tsdoc.DocParamBlock | undefined

Returns the @param documentation for this parameter, if present.