Skip to content

JSDoc highlighting fails on multiline type definition #726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Seblor opened this issue Feb 25, 2019 · 2 comments
Closed

JSDoc highlighting fails on multiline type definition #726

Seblor opened this issue Feb 25, 2019 · 2 comments

Comments

@Seblor
Copy link

Seblor commented Feb 25, 2019

  • VSCode Version: 1.31.1
  • OS Version: Windows 10

When creating a JSDoc type definition (with either @type or @typedef), the syntax highlighting fails at the first new line :

Steps to Reproduce:

Create JS file, write this code :

/**
 * @typedef {{
 *   mode: "manual" | "auto",
 *   foo: String
 * }} someType
 */

/**
 * @type {{
 *   state: someType
 *   someProp: {
 *     foobar: Number
 *   }
 * }}
 */
const store = {
	"state": {
		"mode": "auto"
	}
};

The JSDoc syntax highlighting shows the {{ in the first line in red with the rest of the comment in the usual dark green comment color, however, the JSDoc has been successfully parsed :

Hovering the store variable :

Preview 1

Switch/case intellisense :

Preview 2

@mjbvz mjbvz transferred this issue from microsoft/vscode Feb 25, 2019
@mjbvz mjbvz removed their assignment Feb 25, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Feb 25, 2019

Duplicate of #467

@mjbvz mjbvz marked this as a duplicate of #467 Feb 25, 2019
@sheetalkamat
Copy link
Member

Yes this is duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants