Closed IgorMinar closed 8 years ago
@robwormald pointed out that the issue doesn't happen with typescript@1.7.3 but only with typescript@1.6.2.
So we don't need to rush to cut a new alpha because by updating typescript people can resolve this issue locally.
@IgorMinar, The issue is that "this" types were introduced in TS 1.7.3; they are not a supported syntax in 1.6.*. Looking at the code base, this seems to be the only location of "this" types in the angular code base. so your change in #5784 should be sufficient. There are some documentation about the breaking change, but we will try to think how we could mitigate issues like these in the future. sorry for the trouble.
OK. Thanks! On Thu, Dec 10, 2015 at 10:05 AM Mohamed Hegazy notifications@github.com wrote:
@IgorMinar https://github.com/IgorMinar, The issue is that "this" types https://github.com/Microsoft/TypeScript/pull/4910 were introduced in TS 1.7.3; they are not a supported syntax in 1.6.*. Looking at the code base, this seems to be the only location of "this" types in the angular code base. so your change in #5784 https://github.com/angular/angular/issues/5784 should be sufficient. There are some documentation about the breaking change https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#changes-in-inferring-the-type-from-this, but we will try to think how we could mitigate issues like these in the future. sorry for the trouble.
— Reply to this email directly or view it on GitHub https://github.com/angular/angular/issues/5784#issuecomment-163704549.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
This seems to be a bug in typescript 1.7.3 introduced in alpha.51. The d.ts that we produce now and publish to npm fail the type-check when compiled against an angular app.
originally reported as https://github.com/angular/angular-cli/pull/98
// @mhegazy - known issue? This seems related to the other changes I had to make in angular/angular to get us onto 1.7.3: https://github.com/angular/angular/commit/51cb7586e0851734f497a7f6d0f6d68d818a963e#diff-e9823adbf8e551100ff36e0a9b9607ecL184