Skip to main content

TinyliciousClient Class

Provides the ability to have a Fluid object backed by a Tinylicious service.

Signature

/** @sealed */
export declare class TinyliciousClient

Constructors

Constructor Description
(constructor)(properties) Creates a new client instance using configuration parameters.

Methods

Method Return Type Description
createContainer(containerSchema, compatibilityMode) Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }> Creates a new detached container instance in Tinylicious server.
getContainer(id, containerSchema, compatibilityMode) Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }> Accesses the existing container given its unique ID in the tinylicious server.

Constructor Details

(constructor)

Creates a new client instance using configuration parameters.

Signature

constructor(properties?: TinyliciousClientProps);

Parameters

Parameter Modifiers Type Description
properties optional TinyliciousClientProps Optional. Properties for initializing a new TinyliciousClient instance

Method Details

createContainer

Creates a new detached container instance in Tinylicious server.

Signature

createContainer<TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
container: IFluidContainer<TContainerSchema>;
services: TinyliciousContainerServices;
}>;
Type Parameters
Parameter Constraint Description
TContainerSchema ContainerSchema

Parameters

Parameter Type Description
containerSchema TContainerSchema Container schema for the new container.
compatibilityMode CompatibilityMode Compatibility mode the container should run in.

Returns

New detached container instance along with associated services.

Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }>

getContainer

Accesses the existing container given its unique ID in the tinylicious server.

Signature

getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
container: IFluidContainer<TContainerSchema>;
services: TinyliciousContainerServices;
}>;
Type Parameters
Parameter Constraint Description
TContainerSchema ContainerSchema

Parameters

Parameter Type Description
id string Unique ID of the container.
containerSchema TContainerSchema Container schema used to access data objects in the container.
compatibilityMode CompatibilityMode Compatibility mode the container should run in.

Returns

Existing container instance along with associated services.

Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }>

See Also

https://fluidframework.com/docs/testing/tinylicious/