-
Notifications
You must be signed in to change notification settings - Fork 413
Closed
Description
#229 and #167 both proposed this, but were closed even though it is not supported - the workaround in #167 was to change the schema, which I can't do because I don't control the schemas.
{
type: 'object',
properties: {
a: { type: 'string' },
b: { type: 'number' }
},
anyOf: [
{ required: ['a'] },
{ required: ['b'] }
]
}
Should produce:
type T =
| {
a: string,
b?: number,
}
| {
a?: string,
b: number,
}
silesky, opl-, lukeggchapman, dkvasnicka, AGenevray and 9 morefelixdivo
Metadata
Metadata
Assignees
Labels
No labels