Closed kherock closed 3 years ago
This is finally ready again. I hadn't realized that the unit tests using proxyquire
weren't working, but I think I came up with a pretty effective workaround.
I also will be using the types that were recently added and had some tweaks for them. Let me know if they don't seem right. My main criticism is that they're too tolerant of nullish values. The actual implementations aren't null safe because the following are type errors:
countries[undefined]; // Type 'undefined' cannot be used as an index type
countries[null]; // Type 'undefined' cannot be used as an index type
Therefore argument values used to index dictionaries shouldn't be nullable.
Amazing, @kherock. Changes are now available in v3.2.1. Thanks a lot!
Since v3.0, the build distributed on NPM are a bit broken:
esm
folder imports from../src
, which is excluded from the packageTo fix this, I've converted the source code to ESM and modified the rollup config, adding an ES modules target. I've also made the default builds unminified for debugging purposes.