Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support babel-ts AST type TSNamedTupleMember #8885

Merged
merged 1 commit into from Aug 4, 2020

Conversation

fisker
Copy link
Sponsor Member

@fisker fisker commented Aug 2, 2020

Fixes #8883

Include changes from #8869, should merge it first.

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Feel free to merge after first merge

@fisker fisker marked this pull request as ready for review August 3, 2020 13:19
@fisker fisker mentioned this pull request Aug 3, 2020
@@ -0,0 +1,22 @@
// https://github.com/babel/babel/pull/11754
// TODO: move this file to `test/typescript/tuple`
Copy link
Contributor

Choose a reason for hiding this comment

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

??

Copy link
Member

Choose a reason for hiding this comment

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

Current typescript-estree cannot parse labeled tuple types. So we should put this in /tests/misc/typescript-babel-only for now.

@Arrow7000
Copy link

Sorry in advance if this is the wrong place, but Prettier still doesn't seem to be able to handle labelled tuple types. I'm trying to use Prettier v2.3.0 from within VS Code and it's not working. I'm using Parcel Bundler for my project.

What do I need to do to get it to handle this syntax correctly?

@thorn0
Copy link
Member

thorn0 commented May 27, 2021

@Arrow7000
Copy link

Hi @thorn0, thanks for looking into this. I managed to reproduce this on a CodeSandbox. You can invoke Prettier by saving the file.

Let me know if you need anything else from me.

@thorn0
Copy link
Member

thorn0 commented May 27, 2021

Sorry, but this isn't a valid isolated reproduce. If you can't provide a reproduce that doesn't involve third-party things like VS Code or CodeSandbox, that means that the problem is not on Prettier's side. Prettier formats that code with no problem: playground

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

new AST type TSNamedTupleMember not handled
6 participants