Skip to main content
Version: v1

TinyliciousClient Class

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

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

Signature

export declare class TinyliciousClient

Constructors

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

Methods

Method Return Type Description
createContainer(containerSchema) Promise<{ container: IFluidContainer; services: TinyliciousContainerServices; }> Creates a new detached container instance in Tinylicious server.
getContainer(id, containerSchema) Promise<{ container: IFluidContainer; 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(props?: TinyliciousClientProps | undefined);

Parameters

Parameter Modifiers Type Description
props optional TinyliciousClientProps | undefined Optional. Properties for initializing a new TinyliciousClient instance

Method Details

createContainer

Creates a new detached container instance in Tinylicious server.

Signature

createContainer(containerSchema: ContainerSchema): Promise<{
container: IFluidContainer;
services: TinyliciousContainerServices;
}>;

Parameters

Parameter Type Description
containerSchema ContainerSchema Container schema for the new container.

Returns

New detached container instance along with associated services.

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

getContainer

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

Signature

getContainer(id: string, containerSchema: ContainerSchema): Promise<{
container: IFluidContainer;
services: TinyliciousContainerServices;
}>;

Parameters

Parameter Type Description
id string Unique ID of the container.
containerSchema ContainerSchema Container schema used to access data objects in the container.

Returns

Existing container instance along with associated services.

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