Function: defineStorageState()
ts
function defineStorageState<P, M>(options): StorageState<InferInputValue<P, M>, InferInputWritable<P, M>>;Defined in: storage/define-storage-state.ts:82
Defines a value in a storage without a ref, for code that runs outside a component. useStorage turns it into a ref.
Type Parameters
| Type Parameter | Default type |
|---|---|
P extends ParserInput | undefined | undefined |
M | null |
Parameters
| Parameter | Type |
|---|---|
options | WithParser<StorageStateOptions, P, M> |
Returns
StorageState<InferInputValue<P, M>, InferInputWritable<P, M>>