Replies: 1 comment 1 reply
-
|
@rolanday Hi, It's a little unintuitive, but you can quote the negative value. export type T = {
/**
* @minimum "-90"
* @maximum "90"
*/
x: number
}Results in import { Type, Static } from '@sinclair/typebox'
export type T = Static<typeof T>
export const T = Type.Object({
x: Type.Number({ minimum: -90, maximum: 90 })
})This project implements a custom JSDoc parser which encodes the rule that if a quoted value appears to be numeric, it will be converted into a number. Also, the Hope this helps |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
This is prob a JSDoc question but no luck finding an answer. I want to express lower bound as negative like so:
However, codegen returns the following when I do:
How do I mark-up JSDoc param so minimum is parsed correctly?
Any help much appreciated. Thanks! :-)
Beta Was this translation helpful? Give feedback.
All reactions