Skip to content

Fix type annotations originating in property initializers being emitted in constructor - #31805

Closed
Andrew Branch (andrewbranch) wants to merge 2 commits into
microsoft:masterfrom
andrewbranch:bug/31792
Closed

Fix type annotations originating in property initializers being emitted in constructor#31805
Andrew Branch (andrewbranch) wants to merge 2 commits into
microsoft:masterfrom
andrewbranch:bug/31792

Conversation

@andrewbranch

Copy link
Copy Markdown
Member

Fixes #31792

@rbuckton Ron Buckton (rbuckton) left a comment

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.

Yeah, this is exactly the same thing I saw as well.


const parameters = transformConstructorParameters(constructor);
const body = transformConstructorBody(node.members, constructor, parametersWithPropertyAssignments);
const body = transformConstructorBody(existingMembers, constructor, parametersWithPropertyAssignments);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TL;DR: node.members are the original, untransformed members; existingMembers have been transformed through visitTypeScript.

@ahejlsberg

Copy link
Copy Markdown
Member
@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 6, 2019

Copy link
Copy Markdown
Contributor

Heya Anders Hejlsberg (@ahejlsberg), I've started to run the extended test suite on this PR at e203073. You can monitor the build here. It should now contribute to this PR's status checks.

@mheiber

Copy link
Copy Markdown
Contributor

PR that broke this was #30467, reverted in #31807

@andrewbranch

Copy link
Copy Markdown
Member Author

Closing as #30467 was reverted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

5 participants