I upgraded my Angular version from version 2.4.0 to 4.0.0 while compiling, I am getting following errors.
How can I resolve those errors?
I upgraded my Angular version from version 2.4.0 to 4.0.0 while compiling, I am getting following errors.
How can I resolve those errors?
For me, this problem was caused by The Visual Studio project file referencing the wrong TypeScript compiler version - see my answer at https://stackoverflow.com/a/43963664/236860 and Allen Conway's excellent post.
change the version of typescript to TypeScript 2.1.
This happens because there were breaking changes in typescript 2.1 Example :
declare const TEST_FIXTURE: string
now gets output as
declare const TEST_FIXTURE = "whatever";
I have the same error. Global changes on TS version do not work, but when i change TS version to newest in devDependencies on package.json file, error goes away.
I had a similar problem. Just installing typescript solve the problem.
npm install -g typescript