Skip to content
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

Allow deeply nested immediately resolving conditionals without any syntactic requirements #36584

Conversation

weswigham
Copy link
Member

or implementation contortions. We already don't cache anything or create intermediate instantiations in the immediate simplification cases, so all we needed to do was except the instantiation depth limit in those scenarios.

Much simpler alternative to #36583, as a point of comparison.

Fixes #28663

@sandersn
Copy link
Member

Same comment as #36583 (comment). It also seems like this solution might overapply and escape the depth limit in incorrect cases.

@weswigham
Copy link
Member Author

@typescript-bot cherry-pick this into nestedConditionalTypes

@typescript-bot
Copy link
Collaborator

Hey @weswigham, I couldn't open a PR with the cherry-pick. (You can check the log here). You may need to squash and pick this PR into nestedConditionalTypes manually.

@weswigham weswigham force-pushed the allow-deeply-nested-conditionals-without-complexity branch from 073faae to 87eb951 Compare February 25, 2020 01:03
…ntactic requirements or implementation contortions

Extract logic into function
@weswigham weswigham force-pushed the allow-deeply-nested-conditionals-without-complexity branch from 87eb951 to 8b4744a Compare February 25, 2020 01:04
@weswigham weswigham closed this Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Long conditional type resolves to any
3 participants