PatrickJS / angular-hmr-loader

:fire: Angular HMR Webpack Loader by @AngularClass
http://bit.ly/angular-class
Apache License 2.0
32 stars 6 forks source link

HMR-Loader triggers error linting with bootstrap #6

Open jsgoupil opened 7 years ago

jsgoupil commented 7 years ago

By adding this loader:

.concat(isProd ? [] : '@angularclass/hmr-loader'),

I get the following errors when using webpack:

ERROR in ./app/main.ts
(24,344): error TS7006: Parameter 'status' implicitly has an 'any' type.

ERROR in ./app/main.ts
(24,505): error TS7006: Parameter 'err' implicitly has an 'any' type.

ERROR in ./app/main.ts
(24,510): error TS7006: Parameter 'outdatedModules' implicitly has an 'any' type.

ERROR in ./app/main.ts
(24,697): error TS7006: Parameter 'dependencies' implicitly has an 'any' type.

ERROR in ./app/main.ts
(24,826): error TS7006: Parameter 'store' implicitly has an 'any' type.

tsconfig.json has "noImplicitAny": true,

cormacrelf commented 7 years ago

Add it first.

(PROD ? [] : ['@angularclass/hmr-loader']).concat(['awesome-typescript-loader', (...)])
jsgoupil commented 7 years ago

@cormacrelf what would this change? It's the output that causes an error with tsconfig.json checking for no Implicit any.

cormacrelf commented 7 years ago

I have no idea why it works, but it does. I initially put @angularclass/hmr-loader first without a PROD switch, but this started happening when I put it last with the switch. You are witnessing the magic of front-end JS config. Behold.

glebmachine commented 7 years ago

@cormacrelf yes, it works.