Skip to content

Introduce introspecing fast path for keyof intersection distribution #23986

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

Closed
wants to merge 2 commits into from

Conversation

weswigham
Copy link
Member

@weswigham weswigham commented May 9, 2018

Fixes #23977

This does fix the OOM crash, however right now the fast-path logic just gives up if there's a non-literal type present; handling string and symbol gracefully without giving up on the fastpath is maybe worth doing.

@weswigham weswigham requested review from ahejlsberg and mhegazy May 9, 2018 00:18
…preserve input union if no filtering is actually performed
@weswigham
Copy link
Member Author

cc @ahejlsberg since you got assigned to this issue a minute before I opened this PR.

@ahejlsberg
Copy link
Member

I've just put up #24137 which performs a similar optimization but in the main path of intersection type creation.

@weswigham weswigham closed this May 17, 2018
@weswigham weswigham deleted the fix-oom branch May 17, 2018 21:05
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

indexing with T extends keyof <Large Union> causes OOM
2 participants