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: handle negative minimum, maximum, and default values from jsDoc #250

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

mrdan
Copy link
Contributor

@mrdan mrdan commented Jul 11, 2024

Closes #227 (or would if it wasn't already closed for inactivity)

Why

Linked issue isn't mine, but I experienced (almost) the same thing. I have an interface that has a negative minimum value in the jsDoc

  /**
   * @minimum -45 @maximum 45
   */
  angle: number | null

Which results in the error:

Error: Debug Failure. False expression: Negative numbers should be created in combination with createPrefixUnaryExpression

This PR prevents the error and adds a check a couple of the existing tests

@tvillaren tvillaren merged commit 998a3c8 into fabien0102:main Jul 11, 2024
2 checks passed
@tvillaren
Copy link
Collaborator

Thanks @mrdan

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