question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TS 2.7.1 Definite assignments not parsed correctly

See original GitHub issue
  • I have searched through existing issues
  • I have read through docs
  • 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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
lanthalercommented, Apr 8, 2018

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

5reactions
octrefcommented, May 15, 2018

The next version has been published.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - TypeScript 2.7
The definite assignment assertion is a feature that allows a ! to be placed after instance property and variable declarations to relay to...
Read more >
Definite assignment assertions not in AST · Issue #424 - GitHub
Definite assignment assertions not in AST #424 ... 2.7: exclamation marks in property declarations aren't parsed prettier/prettier#3561.
Read more >
Announcing TypeScript 2.7 RC - Microsoft Developer Blogs
Definite Assignment Checks for Class Properties. TypeScript 2.7 introduces a new flag called --strictPropertyInitialization .
Read more >
What's the difference between definite assignment assertion ...
The following code is an error in strict mode since TS doesn't know for sure that the field has been initialized. class Person...
Read more >
PyCharm 2.7.2 Release Notes | Knowledge Base - YouTrack
Include non-project files not working ... dimension discovery in css won't insert correct value when there are more than one background-image have defined....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found