rubenspgcavalcante / webpack-extension-reloader

A upgrade from šŸ”„webpack-chrome-extension-reloaderšŸ”„, now on all browsers
MIT License
494 stars 78 forks source link

Getting TypeScript errors in the type definitions file #107

Open vladfulgeanu opened 4 years ago

vladfulgeanu commented 4 years ago

Type:

Environment:

I'm going to open a PR:

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: image

What would be the cause for this?

rikharink commented 4 years ago

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?

nopmop commented 3 years ago

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.