Skip to content

fix(zone.js): work around TS3.7 issue#33294

Closed
mprobst wants to merge 1 commit intomasterfrom
zone-ts37
Closed

fix(zone.js): work around TS3.7 issue#33294
mprobst wants to merge 1 commit intomasterfrom
zone-ts37

Conversation

@mprobst
Copy link
Copy Markdown
Contributor

@mprobst mprobst commented Oct 21, 2019

In TypeScript 3.7, circularity detection misfires on the declaration of value here.
microsoft/TypeScript#32950

Declaring an explicit type avoids the problem.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)
  • Build related changes

Does this PR introduce a breaking change?

  • Yes
  • No

@mprobst mprobst requested review from a team and JiaLiPassion October 21, 2019 12:45
Copy link
Copy Markdown
Contributor

@JiaLiPassion JiaLiPassion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@matsko matsko added the area: zones Issues related to zone.js label Oct 22, 2019
@ngbot ngbot Bot added this to the needsTriage milestone Oct 22, 2019
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
let value = obj[key];
let value: any = obj[key];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a comment for why the any was introduced and when it can be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

In TypeScript 3.7, circularity detection misfires on the declaration of `value` here.
microsoft/TypeScript#32950

Declaring an explicit type avoids the problem.
@IgorMinar IgorMinar added target: major This PR is targeted for the next major release action: merge The PR is ready for merge by the caretaker labels Oct 31, 2019
@AndrewKushnir AndrewKushnir added target: patch This PR is targeted for the next patch release and removed target: major This PR is targeted for the next major release labels Oct 31, 2019
atscott pushed a commit that referenced this pull request Nov 1, 2019
In TypeScript 3.7, circularity detection misfires on the declaration of `value` here.
microsoft/TypeScript#32950

Declaring an explicit type avoids the problem.

PR Close #33294
@atscott atscott closed this in 0953642 Nov 1, 2019
@angular-automatic-lock-bot
Copy link
Copy Markdown

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.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Dec 2, 2019
@mprobst mprobst deleted the zone-ts37 branch December 3, 2019 08:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: zones Issues related to zone.js cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants