FluidContainer Interface
A Fluid container.
To use, import via fluid-framework/alpha.
For more information about our API support guarantees, see here.
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 FluidContainer<TData = unknown> extends DataStoreCreator, ErasedBaseType<readonly ["FluidContainer", TData]>
Extends: DataStoreCreator, ErasedBaseType<readonly ["FluidContainer", TData]>
Type Parameters
| Parameter | Default | Description |
|---|---|---|
| TData | unknown | The type of the container's root data store, exposed via data. |
Remarks
A document which can be stored to or loaded from a Fluid service using a ServiceClient.
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| data | Alpha | readonly | TData | The root data store of the container. |
| id | Alpha | optional, readonly | string | undefined | The unique identifier for this container within its service. |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| close() | Alpha | void | Close the container, stopping all networking and cancelling runtime timers. |
Property Details
data
The root data store of the container.
For more information about our API support guarantees, see here.
Signature
readonly data: TData;
Type: TData
Remarks
The type of the root data store is defined by the DataStoreKind used to create the container.
id
The unique identifier for this container within its service.
For more information about our API support guarantees, see here.
Signature
readonly id?: string | undefined;
Type: string | undefined
Remarks
undefined if the container has not yet been attached to a service. This can be used to load another instance of this container from the service using loadContainer(id, root).
Method Details
close
Close the container, stopping all networking and cancelling runtime timers.
For more information about our API support guarantees, see here.
Signature
close(): void;
Remarks
After calling close(), the container's data can still be read but no further operations can be sent.