Skip to main content
Version: v2

FunctionDef Interface

A function definition interface that describes the structure of a function.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/type-factory/alpha.

For more information about our API support guarantees, see here.

Signature​

export interface FunctionDef<Args extends readonly Arg[], Return extends TypeFactoryType, Rest extends TypeFactoryType | null = null>

Type Parameters​

ParameterConstraintDefaultDescription
Argsreadonly Arg[]
ReturnTypeFactoryType
RestTypeFactoryType | nullnull

Properties​

PropertyAlertsModifiersTypeDescription
argsAlphaArgsThe function's parameters.
descriptionAlphaoptionalstringOptional description of the function.
restAlphaoptionalRestOptional rest parameter type.
returnsAlphaReturnThe function's return type.

Property Details​

args​

The function's parameters.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

args: Args;

Type: Args

description​

Optional description of the function.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

description?: string;

Type: string

rest​

Optional rest parameter type.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

rest?: Rest;

Type: Rest

returns​

The function's return type.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

returns: Return;

Type: Return