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

Update Types #336

Closed
Chaysen opened this issue Feb 9, 2023 · 2 comments
Closed

Update Types #336

Chaysen opened this issue Feb 9, 2023 · 2 comments

Comments

@Chaysen
Copy link
Contributor

Chaysen commented Feb 9, 2023

Hey,
Thanks for the awesome package. Could you update the return types from the hooks. Gettin TS errors
e.g.
function createChromeStorageStateHookLocal<S>(key: string, initialValue: S | (() => S)): [S, Dispatch<SetStateAction<S>>, boolean, string];
should be
function createChromeStorageStateHookLocal<S>(key: string, initialValue: S | (() => S)): () => [S, Dispatch<SetStateAction<S>>, boolean, string];

@onikienko
Copy link
Owner

Hi @Chaysen
Thank you for your feedback.
May you please make PR with that fix?
Typescript is not my language. Contributors support TS part.

@Chaysen
Copy link
Contributor Author

Chaysen commented Feb 9, 2023

@onikienko cool no worries. Opened a PR

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