Skip to main content

DataObject Class

DataObject is a base data store that is primed with a root directory. It ensures that it is created and ready before you can access it.

Having a single root directory allows for easier development. Instead of creating and registering channels with the runtime any new DDS that is set on the root will automatically be registered.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/aqueduct/legacy.

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

Signature

export declare abstract class DataObject<I extends DataObjectTypes = DataObjectTypes> extends PureDataObject<I>

Extends: PureDataObject<I>

Type Parameters

ParameterConstraintDefaultDescription
IDataObjectTypesDataObjectTypesThe optional input types used to strongly type the data object

Properties

PropertyAlertsModifiersTypeDescription
rootBetareadonlyISharedDirectoryThe root directory will either be ready or will return an error. If an error is thrown the root has not been correctly created/set.

Methods

MethodAlertsReturn TypeDescription
getUninitializedErrorString(item)BetastringGenerates an error string indicating an item is uninitialized.
initializeInternal(existing)BetaPromise<void>Initializes internal objects and calls initialization overrides. Caller is responsible for ensuring this is only invoked once.

Property Details

root

The root directory will either be ready or will return an error. If an error is thrown the root has not been correctly created/set.

This API is provided for existing users, but is not recommended for new users.

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

Signature

protected get root(): ISharedDirectory;

Type: ISharedDirectory

Method Details

getUninitializedErrorString

Generates an error string indicating an item is uninitialized.

This API is provided for existing users, but is not recommended for new users.

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

Signature

protected getUninitializedErrorString(item: string): string;

Parameters

ParameterTypeDescription
itemstringThe name of the item that was uninitialized.

Returns

Return type: string

initializeInternal

Initializes internal objects and calls initialization overrides. Caller is responsible for ensuring this is only invoked once.

This API is provided for existing users, but is not recommended for new users.

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

Signature

initializeInternal(existing: boolean): Promise<void>;

Parameters

ParameterTypeDescription
existingboolean

Returns

Return type: Promise<void>