microsoft / microsoft/TypeScript
Recognize properties introduced by jQuery extend
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
The old VS JS language service used to make runtime types available at design-time, allowing it to support jQuery's extend function for adding properties dynamically. The new one uses static types and so does not offer these symbols during completion, navigate-to, etc. We've had some customer inquiries about the possibility of supporting this functionality in the TS language service.
https://developercommunity.visualstudio.com/content/problem/529989/aspnet-在html-文件-js-智能提示失效.html
https://developercommunity.visualstudio.com/content/problem/560277/javascript-go-to-members-doesnt-work-with-property.html
The latter provided this example:
(function ($) {
mynamespace.myClass = Class.extend({
init: function (options) {
// unless you specifically type this.testProperty = "abc" in JS, the 'Go to Members' will not find the below property even though it's explicitely defined.
},
__properties: {
'testProperty': {
/// <summary>
/// Gets or sets the test property
/// </summary>
/// <value type="String"></value>
get: function () {
return this._testProperty;
},
set: function (value) {
this._testProperty = value;
}
}
}
});
})(jQuery);
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
Inizia esaminando i due report collegati di Developer Community e l’esempio jQuery/Class.extend. Poiché non sono indicati file sorgente né test, individua innanzitutto gli entry point del language-service di TypeScript per completion e navigate-to, quindi definisci cosa dovrebbe comprendere il riconoscimento delle proprietà introdotte dinamicamente e come può essere testato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100