microsoft / microsoft/TypeScript
Make Javascript intellisense detect inheritance
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
From @benjaminmillhouse on December 21, 2016 17:33
- VSCode Version: Code 1.8.0 (38746938a4ab94f2f57d9e1309c51fd6fb37553d, 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.
Copied from original issue: Microsoft/vscode#17690
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non è indicato alcun file sorgente, test o punto di ingresso. Inizia riproducendo in VS Code l'esempio fornito con BaseClass/InheritedClass e segui il percorso di JavaScript IntelliSense che gestisce l'ereditarietà dei prototipi. Il lavoro è completato quando i suggerimenti di completamento per new InheritedClass() includono i membri ereditati foo e baz.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100