SharedObjectCreator Interface
Creates instances of SharedObjectKinds.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/shared-object-base/alpha.
For more information about our API support guarantees, see here.
Sealed
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export interface SharedObjectCreator<TConstraint = IFluidLoadable>
Type Parameters
| Parameter | Default | Description |
|---|---|---|
| TConstraint | IFluidLoadable |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| createSharedObject(kind) | Alpha | Promise<T> | Create an instance of kind, which must be registered in the registry of the surrounding data store. |
Method Details
createSharedObject
Create an instance of kind, which must be registered in the registry of the surrounding data store.
This API is provided as an alpha preview and may change without notice.
For more information about our API support guarantees, see here.
Signature
createSharedObject<T extends TConstraint>(kind: SharedObjectKey<T>): Promise<T>;
Type Parameters
| Parameter | Constraint | Description |
|---|---|---|
| T | TConstraint |
Parameters
| Parameter | Type | Description |
|---|---|---|
| kind | SharedObjectKey<T> |
Returns
Return type: Promise<T>