typesafe-joi
typesafe-joi copied to clipboard
Problem with Joi.array
Consider the following schema:
const arraySchema = Joi.array().items(Joi.array().items(Joi.number()));
This produces type (number | number[])[]
, while it should produce number[][]
Sorry but I think typesafe-joi is getting harder to keep up with the original joi repository, because joi is developing toward a "more dynamic" way (hapijs/joi#2037). That means typesafe-joi may not be able to cover the core usage of joi anymore. I would like to stop maintaining this repo.
I am planning to start a new project based on both joi, typesafe-joi and JSON Schema, including joi's nice chaining API, typesafe-joi's power to convert schema into typescript interface, and validation provided by JSON Schema (ajv).
What do you think of this?