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/tree-agent/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
| Parameter | Constraint | Default | Description |
|---|---|---|---|
| Args | readonly Arg[] | ||
| Return | TypeFactoryType | ||
| Rest | TypeFactoryType | null | null |
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| args | Alpha | Args | The function's parameters. | |
| description | Alpha | optional | string | Optional description of the function. |
| rest | Alpha | optional | Rest | Optional rest parameter type. |
| returns | Alpha | Return | The 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