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

handle fragments #474

Merged
merged 2 commits into from
Aug 29, 2023
Merged

handle fragments #474

merged 2 commits into from
Aug 29, 2023

Conversation

cdignam-segment
Copy link
Contributor

I noticed an error when running this tool:

Input:

function tsxFunc(num: number) {
  return (
    <div>
      {(<>
        <div>foo</div>
        <div>{num.map(n => n)}</div>
      </>)}
    </div>
  )
}

Output (error on line 5):

function tsxFunc(num: number) {
  return (
    <div>
      {(<>
        // @ts-expect-error TS232
        <div>foo</div>
        <div>{num.map(n => n)}</div>
      </>)}
    </div>
  )
}

With this PR:

Output (error on line 5):

function tsxFunc(num: number) {
  return (
    <div>
      {(<>
        {/*
        // @ts-expect-error TS2322 */}
        <div>foo</div>
        <div>{num.map(n => n)}</div>
      </>)}
    </div>
  )
}

Copy link
Owner

@kawamataryo kawamataryo left a comment

Choose a reason for hiding this comment

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

Thank you for your pull request!
Very helpful.

@kawamataryo kawamataryo merged commit bbe429a into kawamataryo:main Aug 29, 2023
@kawamataryo
Copy link
Owner

I've released this change in v1.3.2 🚀
Thanks for your contribution!

@cdignam-segment
Copy link
Contributor Author

Thank you for the quick release!

@cdignam-segment cdignam-segment deleted the cdignam/handle-fragments branch August 30, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants