webpack-extension-reloader
webpack-extension-reloader copied to clipboard
Getting TypeScript errors in the type definitions file
Type:
- [X] bug
- [ ] feature
- [ ] enhancement
- [X] question
Environment:
- OS: Ubuntu 20.04
- Browser: Chrome 81
- Library Version: 1.1.4
I'm going to open a PR:
- [ ] yes
- [X] no
Description:
Started getting these 3 new TypeScript errors when starting webpack:
[at-loader] ./node_modules/webpack-extension-reloader/typings/webpack-extension-reloader.d.ts:7:13
TS2304: Cannot find name 'IEntriesOption'.
[at-loader] ./node_modules/webpack-extension-reloader/typings/webpack-extension-reloader.d.ts:19:3
TS2666: Exports and export assignments are not permitted in module augmentations.
[at-loader] ./node_modules/webpack-extension-reloader/typings/webpack-extension-reloader.d.ts:20:3
TS2666: Exports and export assignments are not permitted in module augmentations.
When going inside that file I can indeed see the TS errors:
What would be the cause for this?
I'm not getting these exact errors but if I use typescript style import than TSC says the following: This expression is not constructable. Type 'typeof IExtensionReloaderInstance' has no construct signatures.
Are the type definitions perhaps out of date?
I noticed the problem doesn't happen whenallowJS
is disabled in tsconfig.json
.
Also, it wasn't happening with allowJS
enabled and typescript 3.8.3.