Skip to content

VSCode JSDoc @property and @member are ignored #51467

Closed
@mkahvi

Description

@mkahvi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions