Vetur: TS 2.7.1 Definite assignments not parsed correctly

Created on 10 Mar 2018  路  5Comments  路  Source: vuejs/vetur

  • [x] I have searched through existing issues
  • [x] I have read through docs
  • [x] I have read FAQ

Info

  • Platform: macOS
  • Vetur version: 0.11.7
  • VS Code version: 1.21.0

Problem

Definite assignments are not parsed.
Definite assignment assertions

Reproducible Case

Use vue cli to create a repo with typescript.
Create a method in the HelloWorld component:

methods: {
    test: () => {
      let foo!: string;
    }
  }

This method should parse fine.
I created a quick repo for faster reproduction.

duplicate

Most helpful comment

@octref when do you plan to release the next version?

All 5 comments

This has been fixed by upgrading Vetur's dependency to 2.7.2. Please wait for a new release.

@octref when do you plan to release the next version?

Any update on this?

I manually installed 0.11.8 Preview, which resolved the error.

The next version has been published.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muhajirdev picture muhajirdev  路  3Comments

pdanpdan picture pdanpdan  路  3Comments

octref picture octref  路  3Comments

shaunc picture shaunc  路  3Comments

gabrielboliveira picture gabrielboliveira  路  3Comments