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

@babel/parser(ts): TSTypePredicate should include asserts into its range #12761

Closed
1 task
armano2 opened this issue Feb 5, 2021 · 2 comments · Fixed by #12763
Closed
1 task

@babel/parser(ts): TSTypePredicate should include asserts into its range #12761

armano2 opened this issue Feb 5, 2021 · 2 comments · Fixed by #12763
Labels
i: bug i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@armano2
Copy link
Contributor

armano2 commented Feb 5, 2021

Bug Report

  • I would like to work on a fix!

Current behavior

I did some testing for this change #12678 and fix does not seem to be fully correct, right now asserts keyword is not included into range,

this issue seem to be present only when this keyword is used, in other cases range is correct

related ticket #12676

Input Code

class AssertsFoo {
  isBar(): asserts this is string {
    return;
  }
}

Expected behavior
asserts keyword should be included into range of TSTypePredicate

Environment

  • Babel version(s): [e.g. v7.12.0]
  • Node/npm version: [e.g. Node 12/npm 7]
  • OS: [e.g. macOS 10.15.4, Windows 10]
  • Monorepo: [e.g. yes/no/Lerna]
  • How you are using Babel: [e.g. webpack, rollup, parcel, babel-register]
@babel-bot
Copy link
Collaborator

Hey @armano2! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@fedeci
Copy link
Member

fedeci commented Feb 5, 2021

Working on this, the solution should be similar to #12757

@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 May 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants