Skip to content

error 2551 depending on indent (and it shouldn't even occur here) #1809

@schl3ck

Description

@schl3ck
  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Windows 10 Enterprise ((1803) 64-bit
  • Vetur version: 0.24.0
  • VS Code version: 1.43.2

Problem

Vetur reports the error 2551 at a position where no error is. Also this depends on the indentation of the line. The error says

Property 'houldError' does not exist on type 'CombinedVueInstance<{ tasks: any[]; } & { shouldError(task: any): void; errorsToo(id: any): void; noError(): void; } & Record<never, any> & Vue, object, object, object, Record<never, any>>'. Did you mean 'shouldError'? Vetur(2551)

vetur-error-2551
vetur-error-2551-2

Reproducible Case

I've created a repo that reproduces this error: https://github.com/schl3ck/vetur-error-on-different-indent

The steps are outlined in the readme of the linked repo, but are the same as these:

  1. Clone the repo
  2. Run npm i
  3. Open the folder with VSCode and open the file src/Errors.vue
  4. Wait until everything is loaded
  5. Observe the error Veture(2551) on line 8 & 9 but not on line 10
  6. Indent line 8 or 9 once => error still there
  7. Indent same line again => error vanishes
  8. Remove (...) from the function call on the other line => error vanishes
  9. Add () to the function call on line 10 => error appears

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions