TCMiranda / joi-extract-type

Provides native type extraction from Joi schemas for Typescript
MIT License
151 stars 27 forks source link

Infer union from Joi.when #2

Closed TCMiranda closed 5 years ago

TCMiranda commented 5 years ago

It may be possible to infer A | B from .when('...', { is: X, then: A, otherwise: B }). From: https://github.com/hapijs/joi/issues/1557#issuecomment-430631071

TCMiranda commented 5 years ago

Close with #14