The state restoration configuration options.

Typeparam

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

interface IOptions<T> {
    args?: ((obj) => ReadonlyPartialJSONObject);
    command: string;
    name: ((obj) => string);
    when?: Promise<any> | Promise<any>[];
}

Type Parameters

Hierarchy (view full)

Properties

Properties

args?: ((obj) => ReadonlyPartialJSONObject)

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

Type declaration

command: string

The command to execute when restoring instances.

name: ((obj) => string)

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

Type declaration

    • (obj): string
    • Parameters

      • obj: T

      Returns string

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

The point after which it is safe to restore state.