Closed samuelcolvin closed 9 months ago
Great library, thank you so much
I have the following interface
export interface HeadingProps { level: 1 | 2 | 3 | 4 | 5 | 6 text: string }
And for the level property, I'd like to produce the schema "level": {"enum": [1, 2, 3, 4, 5, 6], "type": "integer"}.
level
"level": {"enum": [1, 2, 3, 4, 5, 6], "type": "integer"}
However no combination of @TJS-type and @enum gives me what I need - adding @TJS-type removes the enum key, and setting @enum won't change type.
@TJS-type
@enum
enum
type
How should I do this?
sorry for the noise, got it to work with this:
export interface HeadingProps { /** * @TJS-enum [1, 2, 3, 4, 5, 6] * @TJS-type integer */ level: 1 | 2 | 3 | 4 | 5 | 6 text: string }
Great library, thank you so much
I have the following interface
And for the
level
property, I'd like to produce the schema"level": {"enum": [1, 2, 3, 4, 5, 6], "type": "integer"}
.However no combination of
@TJS-type
and@enum
gives me what I need - adding@TJS-type
removes theenum
key, and setting@enum
won't changetype
.How should I do this?