typesafe-joi
typesafe-joi copied to clipboard
required() seems to be getting ignored
Noticed when trying to use the sample code example to define a type from a schema:
const schema = Joi.array()
.items({
id: Joi.number().integer().required(),
email: Joi.string().email()
})
.required()
type T = Joi.Literal<typeof schema>
It seems to be ignoring required()
, producing my results below instead:

My versions:
"typesafe-joi": "^2.0.6",
"@hapi/joi": "^15.1.1",
"typescript": "^3.5.1"