- queryStorage<T>(encoder: Encoder<T>): { getItem: (key: string, initialValue: T) => T; removeItem: (key: string) => void; setItem: (key: string, value: T) => void; subscribe: (key: string, callback: (input: T) => void) => () => void }
Type parameters
Parameters
Returns { getItem: (key: string, initialValue: T) => T; removeItem: (key: string) => void; setItem: (key: string, value: T) => void; subscribe: (key: string, callback: (input: T) => void) => () => void }
getItem: (key: string, initialValue: T) => T
- (key: string, initialValue: T): T
Parameters
key: string
initialValue: T
Returns T
removeItem: (key: string) => void
setItem: (key: string, value: T) => void
- (key: string, value: T): void
subscribe: (key: string, callback: (input: T) => void) => () => void
- (key: string, callback: (input: T) => void): () => void
Parameters
key: string
callback: (input: T) => void
Returns () => void