ExposedMethods Interface
An interface for exposing methods of schema classes to an agent.
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 ExposedMethods
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| expose(schema, methodName, tfFunction) | Alpha | void | Expose a method with type factory types. |
Method Details
expose
Expose a method with type factory types.
This API is provided as an alpha preview and may change without notice.
For more information about our API support guarantees, see here.
Signature
expose<const K extends string & keyof MethodKeys<InstanceType<S>>, S extends BindableSchema & Ctor & IExposedMethods, Z extends FunctionDef<readonly Arg[], TypeFactoryType, TypeFactoryType | null>>(schema: S, methodName: K, tfFunction: Z): void;
Type Parameters
| Parameter | Constraint | Description |
|---|---|---|
| K | string & keyof MethodKeys<InstanceType<S>> | |
| S | BindableSchema & Ctor & IExposedMethods | |
| Z | FunctionDef<readonly Arg[], TypeFactoryType, TypeFactoryType | null> |
Parameters
| Parameter | Type | Description |
|---|---|---|
| schema | S | |
| methodName | K | |
| tfFunction | Z |