Closed BalaM314 closed 1 year ago
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.75.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
Issue remains in latest version.
Does this issue occur when all extensions are disabled?: Yes
In Typescript, tokenization misidentifies the code blocks of function properties declared using the object literal method shorthand that have an object return type as object literals.
Function properties can be declared on objects using the method shorthand syntax:
In TypeScript, these functions can also have a return type:
If this return type is an object type, and there is no space between the object type and the function body, tokenization thinks the function body is an object literal. This issue does not appear if the function is created without the shorthand or without an object return type.
Steps to Reproduce:
into VS Code.