Skip to content
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

Support jscheck with jsdoc #66137

Closed
evollhhan opened this issue Jan 7, 2019 · 1 comment
Closed

Support jscheck with jsdoc #66137

evollhhan opened this issue Jan 7, 2019 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@evollhhan
Copy link

I have create a jsconfig.json file in my project and turn jscheck on.

Here is my code

index.d.ts

declare namespace Project {
    class Student {
       private _name: string;
    }
}

index.js

class School {
  constructor() {
    this.students = [];
  }

  /** 
   * @param {Project.Student} student
   */
  addStudent(student) {
    this.students.push(student)
  }
}

const school = new School();

class Student {
  constructor(name = '') {
    /** 
     * @type {string}
     * @private
     */
    this._name = '';
    

    //
    //   WRONG HERE
    //   because the "_name" is not private here even though i define it in the jsdoc
    //
    school.addStudent(this)
  }
}
@vscodebot vscodebot bot assigned mjbvz Jan 7, 2019
@vscodebot vscodebot bot added the javascript JavaScript support issues label Jan 7, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Jan 7, 2019

This is being tracked upstream by microsoft/TypeScript#14009

@mjbvz mjbvz closed this as completed Jan 7, 2019
@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) *duplicate Issue identified as a duplicate of another issue(s) labels Jan 7, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants