hjkcai / typesafe-joi

A fork of joi that produces typed validation results in TypeScript
MIT License
73 stars 9 forks source link

Problem with Joi.array #22

Open thomasmikava opened 5 years ago

thomasmikava commented 5 years ago

Consider the following schema:

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

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

hjkcai commented 4 years ago

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?