joiful-ts / joiful

TypeScript Declarative Validation for Joi
239 stars 18 forks source link

Type unions like "number | null" break number constraint decorators #1

Closed laurence-myers closed 6 years ago

laurence-myers commented 6 years ago

Given a property with type "number | null", the inferred type is "Object", not "Number". This breaks the automatic schema detection.

There needs to be a way to support this, or bypass the automatically chosen schema.

laurence-myers commented 6 years ago

Fixed in v0.0.7