TS 2.7.1 Definite assignments not parsed correctly
See original GitHub issueInfo
- Platform: macOS
- Vetur version: 0.11.7
- VS Code version: 1.21.0
Problem
Definite assignments are not parsed.
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:
- Created 6 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@octref when do you plan to release the next version?
The next version has been published.