Interface: StorageState<T, W>
Defined in: storage/define-storage-state.ts:55
A value in a storage without a ref, for code that runs outside a component.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | string | Missing |
W | T | Missing | undefined |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
get | public | () => T | Reads the value through the parser. | storage/define-storage-state.ts:61 |
key | readonly | string | The key, without the prefix. | storage/define-storage-state.ts:57 |
remove | public | () => void | Removes the entry, whatever the parser and clearOnDefault say. | storage/define-storage-state.ts:65 |
set | public | (value) => void | Writes the value. null, undefined and the missing value remove the entry. | storage/define-storage-state.ts:63 |
storage | readonly | StorageInstance | The instance the state reads from. | storage/define-storage-state.ts:59 |
subscribe | public | (listener) => Unsubscribe | Calls the listener on every change of the entry, and returns the function that stops it. | storage/define-storage-state.ts:67 |