@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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/use-persisted-state

Weekly Downloads

22,336

Version

0.3.4

License

MIT

Unpacked Size

3.48 kB

Total Files

5

Last publish

Collaborators

  • types