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
When using a union that contains a non object(ex: Type.String, Type.Number, Type.Array) inside it and passing this union to a Type.Required it converts the type to a empty object.
How to reproduce:
Create a union type:
exportconstexampleUnionSchema=Type.Union([Type.String(),// it could be a Number, Array and the same error happensType.Object({type: Type.Literal('text'),text: Type.String(),}),])
Use the union type in a field using the Type.Required:
When using a union that contains a non object(ex: Type.String, Type.Number, Type.Array) inside it and passing this union to a Type.Required it converts the type to a empty object.
How to reproduce:
Create a union type:
Use the union type in a field using the
Type.Required
:The schema generated is:
But I think it should be:
Typebox version:
0.34.13
System:
MacOS 14.5
The text was updated successfully, but these errors were encountered: