@twinfinity/core
    Preparing search index...

    Interface ApplicationState<StateT>

    ApplicationState allows an application to recover its state StateT from before the Twinfinity session was established.

    interface ApplicationState<StateT> {
        deserialize(serializedState: string): StateT;
        getCurrentState(): Promise<StateT>;
        serialize(state: StateT): string;
    }

    Type Parameters

    • StateT
    Index

    Methods

    • A function that is able to deserialize the serialized value output by serialize into a StateT

      Parameters

      • serializedState: string

      Returns StateT

    • A function that serializes StateT to a string such that it can be deserialized by deserialize

      Parameters

      Returns string