Skip to main content

DataStoreCreator Interface

A context which has a registry and can create data stores using it.

This API is provided as an alpha preview and may change without notice.

To use, import via fluid-framework/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 DataStoreCreator

Methods

MethodAlertsReturn TypeDescription
createDataStore(kind)AlphaPromise<T>Create a new detached data store T which can be attached to the FluidContainer. by adding a handle to a data store or shared object which is already attached to the FluidContainer.

Method Details

createDataStore

Create a new detached data store T which can be attached to the FluidContainer. by adding a handle to a data store or shared object which is already attached to the FluidContainer.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

createDataStore<T>(kind: DataStoreKey<T>): Promise<T>;
Type Parameters
ParameterDescription
Ttype implemented by the data store to expose in the result, as defined by kind.

Remarks

kind will be looked up in the Registry used to create or load this DataStoreCreator. It is up to that registry to decide how it handles unknown types, for example by throwing an exception or returning a placeholder.

Parameters

ParameterTypeDescription
kindDataStoreKey<T>

Returns

Return type: Promise<T>