@wharfkit/session - v4.0.1
    Preparing search index...

    Interface SessionStorage

    Interface storage adapters should implement.

    Storage adapters are responsible for persisting [[Session]]s and can optionally be passed to the [[SessionKit]] constructor to auto-persist sessions.

    interface SessionStorage {
        read(key: string): Promise<string | null>;
        remove(key: string): Promise<void>;
        write(key: string, data: string): Promise<void>;
    }

    Implemented by

    Index
    • Read key from storage. Should return null if key can not be found.

      Parameters

      • key: string

      Returns Promise<string | null>

    • Delete key from storage. Should not error if deleting non-existing key.

      Parameters

      • key: string

      Returns Promise<void>

    • Write string to storage at key. Should overwrite existing values without error.

      Parameters

      • key: string
      • data: string

      Returns Promise<void>