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

0.3.1 • 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

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

Keywords

none

Install

npm i @types/use-persisted-state

DownloadsWeekly Downloads

41,157

Version

0.3.1

License

MIT

Unpacked Size

4.08 kB

Total Files

4

Last publish

Collaborators

  • types