ExposedProperties Interface
An interface for exposing properties 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 ExposedProperties
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| exposeProperty(schema, name, def) | Alpha | void | Expose a property with type factory type and metadata. |
| exposeProperty(schema, name, tfType) | Alpha | void | Expose a property with type factory type (simple form). |
Method Details
exposeProperty
Expose a property with type factory type and metadata.
This API is provided as an alpha preview and may change without notice.
For more information about our API support guarantees, see here.
Signature
exposeProperty<S extends BindableSchema & Ctor, K extends string>(schema: S, name: K, def: {
schema: TypeFactoryType;
description?: string;
readOnly?: boolean;
}): void;
Type Parameters
| Parameter | Constraint | Description |
|---|---|---|
| S | BindableSchema & Ctor | |
| K | string |
Parameters
| Parameter | Type | Description |
|---|---|---|
| schema | S | |
| name | K | |
| def | { schema: TypeFactoryType; description?: string; readOnly?: boolean; } |
exposeProperty
Expose a property with type factory type (simple form).
This API is provided as an alpha preview and may change without notice.
For more information about our API support guarantees, see here.
Signature
exposeProperty<S extends BindableSchema & Ctor, K extends string>(schema: S, name: K, tfType: TypeFactoryType): void;
Type Parameters
| Parameter | Constraint | Description |
|---|---|---|
| S | BindableSchema & Ctor | |
| K | string |
Parameters
| Parameter | Type | Description |
|---|---|---|
| schema | S | |
| name | K | |
| tfType | TypeFactoryType |