Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Don't create TSParenthesizedType when `createParenthesizedExpressio…#11200

Closed
smelukov wants to merge 4 commits intobabel:next-8-devfrom
smelukov:respect-createParenthesizedExpressions
Closed

Don't create TSParenthesizedType when `createParenthesizedExpressio…#11200
smelukov wants to merge 4 commits intobabel:next-8-devfrom
smelukov:respect-createParenthesizedExpressions

Conversation

@smelukov
Copy link
Contributor

@smelukov smelukov commented Mar 3, 2020

…ns` disabled (#9546)

Q                       A
Fixed Issues? Fixes #9546
Patch: Bug Fix? No
Major: Breaking Change? Yes
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@nicolo-ribaudo
Copy link
Member

The first failure (generation/typescript › types conditional infer) is the @babel/generator I explained in the issue, and it should be fixed.

The second one (generation/typescript › types parenthesized) actually looks OK, and that output file should be re-generated (you can delete output.js and run yarn jest babel-generator).

@nicolo-ribaudo nicolo-ribaudo added area: typescript pkg: parser PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release labels Mar 3, 2020
@nicolo-ribaudo
Copy link
Member

Could you rebase this PR? We have merged the commit from your other PR to the next-8-dev branch.

@smelukov smelukov force-pushed the respect-createParenthesizedExpressions branch from cdacd37 to f4f899d Compare March 11, 2020 07:42
@smelukov
Copy link
Contributor Author

@nicolo-ribaudo done

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thanks!

The failed e2e test would be fixed by rebasing.

@smelukov smelukov force-pushed the respect-createParenthesizedExpressions branch from 3cd7554 to 4b1c5f5 Compare March 13, 2020 09:52
@smelukov
Copy link
Contributor Author

rebased ✅

@nicolo-ribaudo nicolo-ribaudo mentioned this pull request Mar 22, 2020
34 tasks
@JLHwung JLHwung added this to the Babel 8.0 milestone Apr 1, 2020
@oliverdunk
Copy link
Contributor

I think there might be one remaining failure, because types/tuple-optional/output.json needs regenerating with the extra property?

Other than that, looks great!

case tt.parenL:
if (!this.options.createParenthesizedExpressions) {
const startPos = this.state.start;
this.expect(tt.parenL);
Copy link
Contributor

@JLHwung JLHwung Jun 19, 2020

Choose a reason for hiding this comment

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

Suggested change
this.expect(tt.parenL);
this.next();

The switch case has implied this.match(tt.parenL).

@nicolo-ribaudo
Copy link
Member

Merged at 62290aa

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 14, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2021
@JLHwung JLHwung removed this from the v8.0.0 milestone Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants