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

Make Javascript intellisense detect inheritance #17690

Closed
benjaminmillhouse opened this issue Dec 21, 2016 · 2 comments
Closed

Make Javascript intellisense detect inheritance #17690

benjaminmillhouse opened this issue Dec 21, 2016 · 2 comments
Assignees
Labels
javascript JavaScript support issues

Comments

@benjaminmillhouse
Copy link

  • VSCode Version: Code 1.8.0 (3874693, 2016-12-13T17:38:28.425Z)
  • OS Version: Darwin x64 16.3.0
  • Extensions:
Extension Author Version
JSDocTagComplete HookyQR 0.0.2
html-css-class-completion Zignd 1.0.3
theme-atom-one-dark andischerer 0.0.1
vscode-eslint dbaeumer 1.1.0
docthis joelday 0.3.5
Angular1 johnpapa 0.1.16
Angular2 johnpapa 1.0.2
csharp ms-vscode 1.5.3
js-atom-grammar ms-vscode 0.1.10
vscode-icons robertohuertasm 4.0.2
bootstrap-3-snippets wcwhitehead 0.0.8

Hello,
I would love it if VS Code's Javascript intellisense was able to detect inheritance. Please let me know if there is a way to accomplish this today through jsdoc comments or anything like that. I have tried all kinds of different ways to get VS Code to detect it (definitions like below, @Augments, @extends jsdoc comments, etc) and have not gotten anything to work.

As an example, when inheriting like this:
function BaseClass() {
  this.foo = 'bar';
}
BaseClass.prototype.baz = function () { }

function InheritedClass() {
  BaseClass.call(this);
}
InheritedClass.prototype = Object.create(BaseClass.prototype);
InheritedClass.prototype.constructor = InheritedClass;

Would like the intellisense for new InheritedClass(). to show 'foo' and 'baz' as properties/methods for InheritedClass in Intellisense.

@egamma egamma added the javascript JavaScript support issues label Dec 22, 2016
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 29, 2016

This issue was moved to microsoft/TypeScript#13206

@mjbvz
Copy link
Collaborator

mjbvz commented Dec 29, 2016

@benjaminmillhouse Thank you for the report. I've moved this issue to TypeScript since we rely on them for Js IntelliSense. There does not seem to be a way to document this inheritance using JSDoc currently.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

4 participants