microsoft / microsoft/TypeScript
TSServer: Find all reference for per overloaded function type
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
Search Terms
Find references, overload, function, overloaded function
Suggestion
Provide a mechanism to search references of a function with particular overloaded type
Use Cases
In current implementation find all references for overloaded function shows all references for every overload
Some times we need to find references of particular overload only (i.e. a overload is deprecated and we want to update all use cases)
Examples
/**
* @deprecated
**/
declare function fn():void; // overload 1
declare function fn(param:string):number; // overload 2
fn(); // use 1
const x = fn('a'); // use 2
const y = fn('b'); // use 3
Finding references for overload 1 should list use 1.
Finding references for overload 2 should list use 2 and use 3.
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Untersuche zunächst das Verhalten von TSServer bei find-references für überladene Funktionen und wie eine ausgewählte Überladung identifiziert wird. Definiere die Fertigstellung anhand der Beispiele: Die Referenzen für Überladung 1 enthalten nur use 1, während Überladung 2 use 2 und use 3 enthält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- devtools
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100