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

Break change from ts.factory.createNumericLiteral(). #863

Merged
merged 3 commits into from
Nov 8, 2023

Conversation

samchon
Copy link
Owner

@samchon samchon commented Nov 8, 2023

Since TypeScript v5.3 update, it no more allows negative numeric value.

Instead, it must be combined with ts.factory.createPrefixUnaryExpression function like below.

This PR accepted such break change for future TS 5.3 release.

ts.factory.createPrefixUnaryExpression(
    ts.SyntaxKind.MinusToken,
    ts.factory.createNumericLiteral(Math.abs(value)),
)

Since TypeScript v5.3 update, it no more allows negative numeric value. Instead, it must be combined with `ts.factory.createPrefixUnaryExpression` function like below:

```typescript
ts.factory.createPrefixUnaryExpression(
    ts.SyntaxKind.MinusToken,
    ts.factory.createNumericLiteral(Math.abs(value)),
)
```
@samchon samchon added the enhancement New feature or request label Nov 8, 2023
@samchon samchon self-assigned this Nov 8, 2023
Copy link
Owner Author

@samchon samchon left a comment

Choose a reason for hiding this comment

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

OK, no problem.

Test new property `CompilerHost.jsDocParsingMode` on playground following below guide:

microsoft/TypeScript#55739
Copy link
Owner Author

@samchon samchon left a comment

Choose a reason for hiding this comment

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

Also pre-tested TS 5.3 on playground.

@samchon samchon merged commit 9bbd297 into master Nov 8, 2023
2 of 3 checks passed
@samchon samchon deleted the features/createNumericLiteral branch November 8, 2023 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant