-
Notifications
You must be signed in to change notification settings - Fork 6
Description
We get the following errors when enabling the noImplicitAny
option in TypeScript compiler when using the angular2-webpack-starter project:
ERROR in [default] /src/main.browser.ts:26:32
Parameter 'status' implicitly has an 'any' type.
ERROR in [default] /src/main.browser.ts:31:32
Parameter 'err' implicitly has an 'any' type.
ERROR in [default] /src/main.browser.ts:31:37
Parameter 'outdatedModules' implicitly has an 'any' type.
ERROR in [default] /src/main.browser.ts:36:34
Parameter 'dependencies' implicitly has an 'any' type.
This is caused by code that is being patched in by the hmr-loader
into the bootstrapping code. The solution seems simple, add missing any
type annotations. However I'm not sure whether this module is used for projects that don't use TypeScript, which would produce syntax errors for them.
A better solution would be to patch in a function call instead of raw code and to hold the implementation of this function inside of this library so that TypeScript won't ever type check the code. But for this I have no idea how to support the different available module systems to import the function that will be patched in.
Any suggestions?