millify
millify copied to clipboard
Types don't match code when this library is used in ESM
This library is CJS, so when used from an ESM module, you have to do this:
import millify from 'millify';
millify.default(...)
However, this doesn't match up with the published types, which expect the default export to be used directly.
Hmm, I'm having trouble getting this library to work in all scenarios when using ESM. Sometimes it needs .default
and sometimes it doesn't. Publishing an ESM version of this library would probably fix this, or maybe switch the API so the default export is a namespace rather than a function?