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

fix(babel-types): accept UnaryExpression in TSLiteralType #13525

Merged
merged 3 commits into from Jul 2, 2021

Conversation

colinaaa
Copy link
Contributor

@colinaaa colinaaa commented Jul 2, 2021

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

Add validator for TSLiteralType to accept UnaryExpression

eg:

type A = -1 | 1;

…ession

seems that the generated files is missing typings

fix babel#13327
@babel-bot
Copy link
Collaborator

babel-bot commented Jul 2, 2021

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/47181/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 2, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9c5a677:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

now generated types seems correct
@colinaaa colinaaa requested a review from JLHwung Jul 2, 2021
JLHwung
JLHwung approved these changes Jul 2, 2021
Copy link
Contributor

@JLHwung JLHwung left a comment

Thanks!

@JLHwung JLHwung added pkg: types PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Jul 2, 2021
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Thank you!

@nicolo-ribaudo nicolo-ribaudo changed the title fix(babel-types): add validator for TSLiteralType to accept UnaryExpression fix(babel-types): accept UnaryExpression in TSLiteralType Jul 2, 2021
@nicolo-ribaudo nicolo-ribaudo merged commit fce35af into babel:main Jul 2, 2021
24 of 26 checks passed
nicolo-ribaudo pushed a commit to nicolo-ribaudo/babel that referenced this pull request Jul 30, 2021
…13525)

* fix(babel-types): add validator for TSLiteralType to accept UnaryExpression

seems that the generated files is missing typings

fix babel#13327

* fix(babel-types): add allowlist for TSLiteralType

now generated types seems correct

* fix(babel-types): use oneOfNodeTypes instead of oneOf
@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 Oct 2, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: types PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: TSLiteralType should accept UnaryExpression
5 participants