make checker.getAllPossiblePropertiesOfTypes
a public method #38184
Open
Description
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 styleguidist/react-docgen-typescript#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.
Activity