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(codegen): create negative numbers with createNumericLiteral in combination with createPrefixUnaryExpression #625

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

tevariou
Copy link
Contributor

@tevariou tevariou commented Apr 18, 2024

Fixes #626

Typescript >= 5.4 raises an error when using the method createNumericLiteral with a negative number
https://github.com/microsoft/TypeScript/blob/v5.4-rc/src/compiler/factory/nodeFactory.ts#L1257

This pr uses createPrefixUnaryExpression in combination with createNumericLiteral to handle negative numbers.

@tevariou tevariou changed the title fix(codegen): create negative numbers with createPrefixUnaryExpression fix(codegen): create negative numbers with createNumericLiteral in combination with createPrefixUnaryExpression Apr 18, 2024
@Xiphe Xiphe merged commit 4bd4d63 into oazapfts:main Apr 23, 2024
1 check passed
Copy link

🎉 This PR is included in version oazapfts-v6.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript >= 5.4 raises an error when creating negative numbers with createNumericLiteral
2 participants