Skip to content

VSCode JSDoc @property and @member are ignored #51467

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
mkahvi opened this issue Nov 9, 2022 · 1 comment
Closed

VSCode JSDoc @property and @member are ignored #51467

mkahvi opened this issue Nov 9, 2022 · 1 comment

Comments

@mkahvi
Copy link

mkahvi commented Nov 9, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.73.0
  • OS Version: Windows_NT x64 10.0.19045

Steps to Reproduce:

/**
 * @property {Number} num
 */
class Something {
  constructor() {
    Object.defineProperties(this, {
      num: { value: 5, enumerable: true, writable: true }
    });
  }
  
  get other() {
    return this.num; // _any_ typed, instead of Number as per @property
  }
}

@member can be used for the same thing according to JSDoc, but doesn't work any better.

The problem is more obvious when you aren't actually returning the member and are just using it internally.

@mjbvz mjbvz transferred this issue from microsoft/vscode Nov 9, 2022
@mjbvz mjbvz removed their assignment Nov 9, 2022
@mjbvz
Copy link
Contributor

mjbvz commented Nov 9, 2022

Duplicate of #28730

@mjbvz mjbvz marked this as a duplicate of #28730 Nov 9, 2022
@mjbvz mjbvz closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants