Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
EdMSL opened this issue Aug 21, 2021 · 3 comments
Closed

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

EdMSL opened this issue Aug 21, 2021 · 3 comments
Assignees
Labels
types TypeScript type definitions
Milestone

Comments

@EdMSL
Copy link

EdMSL commented Aug 21, 2021

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

@eugene-ganshin
Copy link

Still not resolved ...

@hirvesh
Copy link

hirvesh commented Sep 5, 2022

any pointers on this one?

@Marsup Marsup self-assigned this Sep 20, 2022
@Marsup Marsup added the types TypeScript type definitions label Sep 20, 2022
@Marsup Marsup added this to the 17.6.1 milestone Sep 20, 2022
@Marsup
Copy link
Collaborator

Marsup commented Sep 20, 2022

Fixed #2788.

@Marsup Marsup closed this as completed Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types TypeScript type definitions
Projects
None yet
Development

No branches or pull requests

4 participants