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

JSDoc support for @memberof and @namespace #36176

Open
brendanarnold opened this issue Jan 11, 2020 · 1 comment
Open

JSDoc support for @memberof and @namespace #36176

brendanarnold opened this issue Jan 11, 2020 · 1 comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Domain: JSDoc Relates to JSDoc parsing and type generation Suggestion An idea for TypeScript

Comments

@brendanarnold
Copy link

I work on a NodeJS Javascript codebase which uses plain JSDoc (i.e. no Typescript/Closure specific syntax). It uses require() rather than ES6/Typescript-style imports.

Our codebase has JDoc'ed code which lives under arbitrary @namespace declarations, meaning they do not correspond to actual code 'namespaces'. For example our code is JSDoc'ed as @namespace utilities but the module may be imported as utils.

My colleagues using Webstorm get the full JSDoc annotations/code completion/tooling but VSCode Intellisense does not recognised references like models.Account for e.g. parameters as shown below ...

// models.js

/** @namespace models */

/** @memberof models */
class Account {
  // ...
}

module.exports = { Account }
// main.js
const { Account } = require('./models')

/**
 * @return {models.Account}
 */
myMethod (account) => {
  return new Account()
}

Since basically the entire codebase is namespaced, I get reduced Intellisense support for my custom code and no support for writing correct JSDocs.

@mjbvz mjbvz transferred this issue from microsoft/vscode Jan 14, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Jan 14, 2020

@namespace is tracked by #14233

@mjbvz mjbvz removed their assignment Jan 14, 2020
@RyanCavanaugh RyanCavanaugh added Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation labels Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Domain: JSDoc Relates to JSDoc parsing and type generation Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants