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

Store.set is not type checked #164

Open
Trinovantes opened this issue Apr 11, 2022 · 1 comment
Open

Store.set is not type checked #164

Trinovantes opened this issue Apr 11, 2022 · 1 comment

Comments

@Trinovantes
Copy link

This line makes Typescript accept any key/value for set

set(key: string, value: unknown): void;

I think it should be safe to remove since get does not have an equivalent overload

@sindresorhus
Copy link
Owner

sindresorhus commented Apr 20, 2022

I think it's used for dot-paths (like foo.bar). When TS 4.7 is out (required to move to ESM), we can update dot-prop and get type-safe dot paths, which may make it possible to remove that line.

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