MemoryStorageAdapter
Defined in: packages/api-client/src/core/storage/MemoryStorageAdapter.ts:12
In-memory StorageAdapter backed by a Map<string, string>.
Useful as the default for server-side runtimes (Next.js SSR, Node CLIs) where there is no persistent client-side storage, and as a sensible fallback for React Native consumers who have not yet wired AsyncStorage.
State lives for the lifetime of the instance; new instances start empty.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MemoryStorageAdapter():
MemoryStorageAdapter
Returns
Section titled “Returns”MemoryStorageAdapter
Methods
Section titled “Methods”getItem()
Section titled “getItem()”getItem(
key):Promise<string|null>
Defined in: packages/api-client/src/core/storage/MemoryStorageAdapter.ts:15
Returns the stored value, or null when no entry exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string | null>
Implementation of
Section titled “Implementation of”removeItem()
Section titled “removeItem()”removeItem(
key):Promise<void>
Defined in: packages/api-client/src/core/storage/MemoryStorageAdapter.ts:24
Removes the entry at key. Idempotent — no-op when absent.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”setItem()
Section titled “setItem()”setItem(
key,value):Promise<void>
Defined in: packages/api-client/src/core/storage/MemoryStorageAdapter.ts:20
Persists the value, overwriting any existing entry under key.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<void>