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

0.3.4 • 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.

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.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.4
    8,547
  • 0.3.3
    314
  • 0.3.2
    182
  • 0.3.1
    6,138
  • 0.3.0
    2,950

Package Sidebar

Install

npm i @types/use-persisted-state

Weekly Downloads

18,131

Version

0.3.4

License

MIT

Unpacked Size

3.48 kB

Total Files

5

Last publish

Collaborators

  • types