angular-hmr-loader icon indicating copy to clipboard operation
angular-hmr-loader copied to clipboard

HMR-Loader triggers error linting with bootstrap

Open jsgoupil opened this issue 9 years ago • 4 comments

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,

jsgoupil avatar Nov 26 '16 18:11 jsgoupil

Add it first.

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

cormacrelf avatar Dec 06 '16 23:12 cormacrelf

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

jsgoupil avatar Dec 06 '16 23:12 jsgoupil

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.

cormacrelf avatar Dec 06 '16 23:12 cormacrelf

@cormacrelf yes, it works.

glebmachine avatar Jan 23 '17 09:01 glebmachine