@types/use-persisted-state
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -6,7 +6,10 @@ // Type definitions for use-persisted-state 0.3 | ||
// TypeScript Version: 2.8 | ||
import { useState } from 'react'; | ||
import { Dispatch, SetStateAction } from 'react'; | ||
declare function createPersistedState(key: string, provider?: Pick<Storage, 'getItem' | 'setItem'>): typeof useState; | ||
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; |
{ | ||
"name": "@types/use-persisted-state", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "TypeScript definitions for use-persisted-state", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-persisted-state", | ||
"license": "MIT", | ||
@@ -14,6 +15,7 @@ "contributors": [ | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/use-persisted-state" | ||
}, | ||
@@ -24,4 +26,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "fea120729f5b73bf0ea282a4dd522a9b0b5dc48d8adca2a4c6efd4e342e112e2", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "f064b7129791716453f4dfbb03dc9c6ef7db7c314c6c7145bf6dc5c7f031dfa1", | ||
"typeScriptVersion": "3.8" | ||
} |
@@ -5,13 +5,31 @@ # Installation | ||
# Summary | ||
This package contains type definitions for use-persisted-state ( https://github.com/donavon/use-persisted-state#readme ). | ||
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 | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-persisted-state. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-persisted-state/index.d.ts) | ||
````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'; | ||
Additional Details | ||
* Last updated: Tue, 12 Feb 2019 23:25:22 GMT | ||
* Dependencies: @types/react | ||
* Global values: createPersistedState | ||
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](https://npmjs.com/package/@types/react) | ||
* Global values: `createPersistedState` | ||
# Credits | ||
These definitions were written by Karol Majewski <https://github.com/karol-majewski>. | ||
These definitions were written by [Karol Majewski](https://github.com/karol-majewski). |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
4082
12
1
35
0