MCPcopy
hub / github.com/authts/oidc-client-ts / AsyncStorage

Interface AsyncStorage

src/AsyncStorage.ts:4–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2 * @public
3 */
4export interface AsyncStorage {
5 /** Returns the number of key/value pairs. */
6 readonly length: Promise<number>;
7 /**
8 * Removes all key/value pairs, if there are any.
9 *
10 * Dispatches a storage event on Window objects holding an equivalent Storage object.
11 */
12 clear(): Promise<void>;
13 /** Returns the current value associated with the given key, or null if the given key does not exist. */
14 getItem(key: string): Promise<string | null>;
15 /** Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs. */
16 key(index: number): Promise<string | null>;
17 /**
18 * Removes the key/value pair with the given key, if a key/value pair with the given key exists.
19 *
20 * Dispatches a storage event on Window objects holding an equivalent Storage object.
21 */
22 removeItem(key: string): Promise<void>;
23 /**
24 * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
25 *
26 * Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
27 *
28 * Dispatches a storage event on Window objects holding an equivalent Storage object.
29 */
30 setItem(key: string, value: string): Promise<void>;
31}

Callers 13

_disposeFunction · 0.65
followLinksFunction · 0.65
getMethod · 0.65
removeMethod · 0.65
State.test.tsFile · 0.65
getAllKeysMethod · 0.65
removeMethod · 0.65
toggleLinksFunction · 0.65
setMethod · 0.65

Implementers 1

InMemoryWebStoragesrc/InMemoryWebStorage.ts

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…