maghis / types-joi

TypeScript types for joi (Object schema description language and validator for JavaScript objects) https://github.com/hapijs/joi
28 stars 4 forks source link

How to use checkPreferences? #5

Closed Khuzha closed 3 years ago

Khuzha commented 3 years ago

Is there any way to specify checkPreferences? In real joi I can specify it as follows:

const someSchema = Joi.object().keys({
  ...
}).prefs({ convert: false });

But in types-joi it does not work

Khuzha commented 3 years ago

I saw this my old issue, and would share solution I found: just use .strict(true)