Open JbIPS opened 4 years ago
Hey there! Want to flesh this idea out a bit more? What are some example JSON-Schema inputs, and what outputs will you generate? I'd love to see how this might work for:
oneOf
with primitive typesoneOf
with object types that have the same keys, but different value typesoneOf
with recursively-defined typesoneOf
with combos of the above
The
oneOf
properties is described in README asNot expressible in TypeScript
.I recently discovered the discriminated union type with a mutual exclusion, which fit perfectly with a XOR:
This is well explained in this SO answer and seems to me a perfect fit for
oneOf
.I can work on a PR if you feel OK with this feature.