Skip to content

JS: deprecate member lookup on static types #3781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented Jun 24, 2020

This deprecates the predicates Type.getProperty and variants of Type.getMember and stops extracting the underlying relation, speeding up extraction by about 50%.

The only use-case ever to emerge was to recognize PromiseType, which is only used in js/missing-await. To minimize the fallout of this change, I decided to retain the behaviour of PromiseType via an internal-only API.

The type graph is infinite in general and so we were always limited to extracting only a subset of that graph. That subset has gradually gotten smaller and smaller, and while I don't think it was originally this expensive, TypeScript has evolved and it's just not a sensible thing to do any more, especially given the lack of use cases.

@asgerf asgerf added the JS label Jun 24, 2020
@asgerf asgerf requested a review from a team as a code owner June 24, 2020 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants