Closed chriskrycho closed 5 years ago
Thank you!
I'm surprised this passes, TBH. This was specifically added because globby's types were erroring out on compilation. I'd looked at this with @mike-north and we determined this was the only reasonable course to unblock us. I'll check again, but I'm again surprised.
Curious. Possibly it’s because it was expecting the * as
style import you later changed it to? That’s the only thing I can see based on the changes on the file searcher module.
We should also confirm that we properly fail CI on type errors...
Curious. Possibly it’s because it was expecting the * as style import you later changed it to? That’s the only thing I can see based on the changes on the file searcher module.
the esModuleInterop
stuff was causing trouble when Steve and I looked at this. We should also avoid using this flag in libraries, because it and the related allowSyntheticDefaultImports
are effectively viral options, in that it's very easy to get into a situation where consumers are forced to also enable them.
the esModuleInterop stuff was causing trouble when Steve and I looked at this.
FWIW, you can use the alternative format to work with module.exports = someActualThing;
:
import Thing = require('whatever');
This avoids needing to use the esModuleInterop
flag.
import Thing = require('whatever');
This is equivalent to
import * as Thing from 'whatever';
Aye import thing = require
works, but 🤮. And teaching it to users is a thing I at least would rather avoid.
globby now supplies its own type definitions, which the existing module definition was invisibly smashing; removing it allows the native types shipped with the package to work correctly.