Installation
npm install --save @types/use-persisted-state
Summary
This package contains type definitions for use-persisted-state (https://github.com/donavon/use-persisted-state#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-persisted-state.
index.d.ts
// Type definitions for use-persisted-state 0.3
// Project: https://github.com/donavon/use-persisted-state#readme
// Definitions by: Karol Majewski <https://github.com/karol-majewski>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Dispatch, SetStateAction } from 'react';
declare function createPersistedState<S>(key: string, provider?: Pick<Storage, 'getItem' | 'setItem'>): {
(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
};
export as namespace createPersistedState;
export default createPersistedState;
Additional Details
- Last updated: Sat, 29 Jan 2022 21:31:30 GMT
- Dependencies: @types/react
- Global values:
createPersistedState
Credits
These definitions were written by Karol Majewski.