@types/use-persisted-state
TypeScript icon, indicating that this package has built-in type declarations

0.3.5 • Public • Published

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.

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 = createPersistedState;

Additional Details

  • Last updated: Thu, 30 Jan 2025 20:02:33 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Karol Majewski.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/use-persisted-state

Weekly Downloads

42,534

Version

0.3.5

License

MIT

Unpacked Size

3.5 kB

Total Files

5

Last publish

Collaborators

  • types