UNPKG

827 BTypeScriptView Raw
1
2import { SessionData, SessionIdStorageStrategy, SessionStorage } from "../sessions.js";
3
4//#region lib/server-runtime/sessions/memoryStorage.d.ts
5interface MemorySessionStorageOptions {
6 /**
7 * The Cookie used to store the session id on the client, or options used
8 * to automatically create one.
9 */
10 cookie?: SessionIdStorageStrategy["cookie"];
11}
12/**
13 * Creates and returns a simple in-memory SessionStorage object, mostly useful
14 * for testing and as a reference implementation.
15 *
16 * Note: This storage does not scale beyond a single process, so it is not
17 * suitable for most production scenarios.
18 */
19declare function createMemorySessionStorage<Data = SessionData, FlashData = Data>({
20 cookie
21}?: MemorySessionStorageOptions): SessionStorage<Data, FlashData>;
22//#endregion
23export { createMemorySessionStorage };
\No newline at end of file