neoclide / coc-vetur

Vue language server extension for coc.nvim
219 stars 7 forks source link

Everywhere: [Vetur 2683] [E] 'this' implicitly has type 'any' because it does not have a type annotation #10

Closed doits closed 5 years ago

doits commented 5 years ago

I don't know if this is a Vetur problem or a coc-vetur problem, or a problem with my config, though I have the problem it does not work anymore when I open . It worked some time ago, but now when I open such a .vue file in my project:

<template>
  <div />
</template>

<script lang="ts">
import Vue from 'vue'

export default Vue.extend({
  name: "bla"
})
</script>

... it marks the first line (<template>) and gives ...

1 test.vue|1 col 1 error| [Vetur 2683] 'this' implicitly has type 'any' because it does not have a type annotation. [E]
2 test.vue|1 col 1 error| [Vetur 2345] Argument of type 'boolean' is not assignable to parameter of type 'new (...args: any[]) => any'. [E]

On bigger .vue files it marks a lot of more places, mostly giving 'this' implicitly has type 'any' error.

After I modify the file and save it, the error goes away though. It is really annoying, because on first open (of any .vue file) vim is really slow and takes a while.

I think I need to trace this down further, any idea how to debug this?

doits commented 5 years ago

Fixed by #12