let schema = Joi.object({
a: Joi.any(),
})
type A = Joi.extractType<typeof schema>;
// type A is { a?: any; }
this is wrong
let schema = Joi.object({
a: Joi.any().required(),
})
type A = Joi.extractType<typeof schema>;
// type A still is { a?: any; } but should be { a: any }
Simple example
This is correct
this is wrong