joi
joi copied to clipboard
Property "local" does not exist on type "ErrorReport"
- is this issue currently blocking your project?: no
- is this issue affecting a production system?: no
Context
- node version: 14.x
- module version with issue: 17.4.2
- last module version without issue:
- environment (e.g. node, browser, native): all
- used with (e.g. hapi application, another framework, standalone, ...): all
- any other relevant information: typescript type error
What are you trying to achieve or the steps to reproduce?
Use
const schema = Joi.object({
foo: Joi.number().min(0).error((errors) => {
return new Error('found errors with ' + errors.map((err) => `${err.local.key}(${err.local.limit}) with value ${err.local.value}`).join(' and '));
})
});
What was the result you got?
Compilation error Property "local" does not exist on type "ErrorReport"
What result did you expect?
No ts error.
If I set @ts-ignore all works good.
Still not resolved ...
any pointers on this one?
Fixed #2788.