Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript definitions #3

Closed
reflog opened this issue Apr 11, 2019 · 2 comments
Closed

Typescript definitions #3

reflog opened this issue Apr 11, 2019 · 2 comments

Comments

@reflog
Copy link

reflog commented Apr 11, 2019

Hi! Love the library, really fits my workflow, thank you!
I wrote some basic type-defs to help along, maybe you'll find them useful:

type ZustandCreate<T> = (set) => T;
type ZustandUse<T> = (store: T) => Partial<T>;
declare module "zustand" {
  function create<T>(fn: ZustandCreate<T>): ZustandUse<T>[];
  export = create;
}
@reflog
Copy link
Author

reflog commented Apr 11, 2019

nm, it's still buggy. will reopen when it works fine :)

@reflog reflog closed this as completed Apr 11, 2019
@bernatfortet
Copy link

Thanks for working on this! I'd love to get these typings as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants