The state restoration configuration options.

T - The type of object held by the restorable collection.

interface IOptions<T extends IObservableDisposable> {
    args?: (obj: T) => ReadonlyPartialJSONObject;
    command: string;
    connector: IDataConnector<
        ReadonlyPartialJSONValue,
        ReadonlyPartialJSONValue,
        string,
        string,
    >;
    name: (obj: T) => string;
    registry: CommandRegistry;
    when?: Promise<any> | Promise<any>[];
}

Type Parameters

Hierarchy (View Summary)

Properties

args?: (obj: T) => ReadonlyPartialJSONObject

A function that returns the args needed to restore an instance.

command: string

The command to execute when restoring instances.

connector: IDataConnector<
    ReadonlyPartialJSONValue,
    ReadonlyPartialJSONValue,
    string,
    string,
>

The data connector to fetch restore data.

name: (obj: T) => string

A function that returns a unique persistent name for this instance.

registry: CommandRegistry

The command registry which holds the restore command.

when?: Promise<any> | Promise<any>[]

The point after which it is safe to restore state.