conf icon indicating copy to clipboard operation
conf copied to clipboard

Store.set is not type checked

Open Trinovantes opened this issue 2 years ago • 1 comments

This line makes Typescript accept any key/value for set

https://github.com/sindresorhus/conf/blob/06b640d8cfa22d020b1ac1996a9dca0fc0289f83/source/index.ts#L197

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

Trinovantes avatar Apr 11 '22 21:04 Trinovantes

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.

sindresorhus avatar Apr 20 '22 18:04 sindresorhus