Documentation
    Preparing search index...

    Interface KeyValueStore<TState>

    Key value store operations. Only keyed services have an attached key-value store.

    interface KeyValueStore<TState extends TypedState> {
        clear<TKey extends string | number | symbol>(
            name: TState extends UntypedState ? string : TKey,
        ): void;
        clearAll(): void;
        get<TValue, TKey extends string | number | symbol = string>(
            name: TState extends UntypedState ? string : TKey,
            serde?: Serde<TState extends UntypedState ? TValue : TState[TKey]>,
        ): Promise<null | (TState extends UntypedState ? TValue : TState[TKey])>;
        set<TValue, TKey extends string | number | symbol = string>(
            name: TState extends UntypedState ? string : TKey,
            value: TState extends UntypedState ? TValue : TState[TKey],
            serde?: Serde<TState extends UntypedState ? TValue : TState[TKey]>,
        ): void;
        stateKeys(): Promise<string[]>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Methods