You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionhelper<TextendsJTDSchemaType>(schema: T){returnschema};constmySchema=helper({properties: {num: {type: "float64"},nullableEnum: {enum: ["v1.0","v1.2"],nullable: true},values: {values: {type: "int32"}},},optionalProperties: {optionalStr: {type: "string"},},invalidKey: something// <-- invalid provides an inferred type error in your IDE})// And still be able to get inferred data type when the schema is type validatedconstdata=ajv.compile(mySchema)letnum=data.num// inferred to be number
The text was updated successfully, but these errors were encountered:
What version of Ajv are you using? Does the issue happen if you use the latest version?
8
The last I've seen of work on the
JTDSchemaType
andJTDDataType
is in #1489But the docs still say
For example, something like
The text was updated successfully, but these errors were encountered: