Skip to main content

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

MethodAlertsReturn TypeDescription
expose(schema, methodName, tfFunction)AlphavoidExpose 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
ParameterConstraintDescription
Kstring & keyof MethodKeys<InstanceType<S>>
SBindableSchema & Ctor & IExposedMethods
ZFunctionDef<readonly Arg[], TypeFactoryType, TypeFactoryType | null>

Parameters

ParameterTypeDescription
schemaS
methodNameK
tfFunctionZ