You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the checkJs/allowJs TS compiler options and compiling via ts-loader, I am getting extraneous compile errors (as compared to running tsc standalone).
Run tsc and you will get one compile error, but run webpack and you will get many more—all from within node_modules.
Example
If I only enable allowJs. Here we have extraneous errors from TS declaration files within node_modules:
ERROR in /Users/OliverJAsh/Development/temp/ts-loader-check-js/node_modules/@types/react-redux/index.d.ts
(14,23): error TS2694: Namespace '"/Users/OliverJAsh/Development/temp/ts-loader-check-js/node_modules/redux/es/index"' has no exported member 'Store'.
ERROR in /Users/OliverJAsh/Development/temp/ts-loader-check-js/node_modules/@types/react-redux/index.d.ts
(15,26): error TS2694: Namespace '"/Users/OliverJAsh/Development/temp/ts-loader-check-js/node_modules/redux/es/index"' has no exported member 'Dispatch'.
…
If I enable both allowJs and checkJs. Here we have extraneous errors from JS files within node_modules:
ERROR in /Users/OliverJAsh/Development/temp/ts-loader-check-js/node_modules/redux/es/applyMiddleware.js
(1,23): error TS2339: Property 'assign' does not exist on type 'ObjectConstructor'.
ERROR in /Users/OliverJAsh/Development/temp/ts-loader-check-js/node_modules/redux/es/combineReducers.js
(75,9): error TS2304: Cannot find name 'process'.
…
If I run tsc --noEmit. This error is expected and not extraneous, unlike others.
tsc
node_modules/@types/react-redux/index.d.ts(179,31): error TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).
The text was updated successfully, but these errors were encountered:
When using the
checkJs
/allowJs
TS compiler options and compiling viats-loader
, I am getting extraneous compile errors (as compared to runningtsc
standalone).I have created a small test case here where you can try this for yourself, with the simplest possible reproduction case: https://github.com/OliverJAsh/ts-loader-check-js
Run
tsc
and you will get one compile error, but runwebpack
and you will get many more—all from withinnode_modules
.Example
If I only enable
allowJs
. Here we have extraneous errors from TS declaration files withinnode_modules
:If I enable both
allowJs
andcheckJs
. Here we have extraneous errors from JS files withinnode_modules
:If I run
tsc --noEmit
. This error is expected and not extraneous, unlike others.The text was updated successfully, but these errors were encountered: