fix(types): typo in jsdoc and follow-up #1144 (#1199)

* fix typo in jsdoc

* change State type https://github.com/pmndrs/zustand/pull/1144#issuecomment-1220059294
This commit is contained in:
Devansh Jethmalani 2022-08-19 04:47:44 +05:30 committed by GitHub
parent abb43c4a02
commit 49947c9659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,9 +108,9 @@ export default createStore
// ---------------------------------------------------------
/**
* @deprecated Use `object` instead of `State`
* @deprecated Use `unknown` instead of `State`
*/
export type State = object
export type State = unknown
/**
* @deprecated Use `Partial<T> | ((s: T) => Partial<T>)` instead of `PartialState<T>`
@ -164,6 +164,6 @@ export type SetState<T extends State> = {
export type GetState<T extends State> = () => T
/**
* @deprecated Use `StoreApi<T>['destroy']` instead of `GetState<T>`.
* @deprecated Use `StoreApi<T>['destroy']` instead of `Destroy`.
*/
export type Destroy = () => void