Closed ildukm closed 4 years ago
Hello, thank you for your project. I was wondering if it's possible to infer nullable type.
const n = Joi.number().required().allow(null); Joi.extractType<typeof n>; // expect number | null
Yes it is, actually .allow needs to be implemented for every schema. It is not difficult, I just didn't have time to do it. Help is welcome :grin:
.allow
See https://github.com/TCMiranda/joi-extract-type/issues/5
Hello, thank you for your project. I was wondering if it's possible to infer nullable type.