Skip to content

Property "local" does not exist on type "ErrorReport"  #2663

@EdMSL

Description

@EdMSL
  • 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.

Metadata

Metadata

Assignees

Labels

typesTypeScript type definitions

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions