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
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: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: @types/react
Credits
These definitions were written by Karol Majewski.