typesafe-joi icon indicating copy to clipboard operation
typesafe-joi copied to clipboard

Problem with Joi.array

Open thomasmikava opened this issue 5 years ago • 1 comments

Consider the following schema:

const arraySchema = Joi.array().items(Joi.array().items(Joi.number()));

This produces type (number | number[])[], while it should produce number[][]

thomasmikava avatar Sep 21 '19 16:09 thomasmikava

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?

hjkcai avatar Oct 07 '19 17:10 hjkcai