better-typescript-lib
better-typescript-lib copied to clipboard
Issue when using `object` with `Object.entries` and `Object.values`
As shown above, this overload included in better-typescript-lib cause an issue when applied to an object without a specified key or value type. The overload seems to match too eagerly, returning a type with never
instead of falling through to the more generic call signatures.
Here's one way to fix it, although I don't know if it's the best fix: TS Playground
The same fix seems to work for Object.entries
as well.
Note: This issue is unrelated to https://github.com/uhyo/better-typescript-lib/pull/31 (but maybe worth mentioning there)