microsoft / microsoft/TypeScript
make `checker.getAllPossiblePropertiesOfTypes` a public method
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
Search Terms
compiler, getAllPossiblePropertiesOfTypes, union, intersection, checker, Public API
Suggestion
Change the checker.getAllPossiblePropertiesOfTypes from private to public
Use Cases
This is the only easy way to calculate all the possible properties of an object and is used by the completions API to provide suggestion.
I am currently using this API in https://github.com/styleguidist/react-docgen-typescript/pull/247 to document react props.
Examples
https://github.com/styleguidist/react-docgen-typescript/blob/master/src/parser.ts#L513
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.
BTW I would be happy to make these changes myself and submit a PR.
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
Beginne damit, checker.getAllPossiblePropertiesOfTypes und die completions API zu lokalisieren, und untersuche anschließend die externe Verwendung in react-docgen-typescript's src/parser.ts um Zeile 513. Bestätige die öffentliche API-Oberfläche und überprüfe, dass Aufrufer auf die Methode zugreifen können, ohne das bestehende Laufzeitverhalten zu ändern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100