Anchorage API reference
    Preparing search index...

    Hierarchy

    • ThreadStateStorage
      • D1ThreadStateStorage
    Index

    Constructors

    Methods

    • Delete the state value for a (threadId, type) pair.

      Parameters

      • args: { threadId: string; type: string }

      Returns Promise<void>

    • Get the state value for a (threadId, type) pair. Returns undefined when no value has been set.

      Type Parameters

      • T = unknown

      Parameters

      • args: { threadId: string; type: string }

      Returns Promise<T | undefined>

    • Set the state value for a (threadId, type) pair. Full-replacement semantics: the stored value becomes exactly value.

      Type Parameters

      • T = unknown

      Parameters

      • args: { threadId: string; type: string; value: T }

      Returns Promise<void>