uniformStorage
ref / conversations / uniformStorage
Coerces different storages to a single uniform abstraction.
This function takes a Conversation
Type Parameters
C
ts
C extends Context
S
ts
S
Parameters
storage
ts
storage?: ConversationStorage<C, S>
An object defining how to store data
Return Type
ts
(ctx: C) => {
read: () => MaybePromise<S | undefined>; write: (state: S) => MaybePromise<void>; delete: () => MaybePromise<void>
}