Skip to main content

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

ParameterDefaultDescription
TConstraintIFluidLoadable

Methods

MethodAlertsReturn TypeDescription
createSharedObject(kind)AlphaPromise<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
ParameterConstraintDescription
TTConstraint

Parameters

ParameterTypeDescription
kindSharedObjectKey<T>

Returns

Return type: Promise<T>