Skip to content

Add an extra test case for deferred conditional types #52094

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

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Jan 4, 2023

cc @ahejlsberg

an extra test case for #52091

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jan 4, 2023
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@@ -18,3 +18,21 @@ type Extends<A, B> = A extends B ? true : false;
type IsNumberLiteral<T> = And<Extends<T, number>, Not<Extends<number, T>>>;

type IsLiteral<T> = Or<false, IsNumberLiteral<T>>;

// Repro from #51145#issuecomment-1276804047
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that this test case doesn't showcase that #51145 has been fixed - it's just a variant proposed by @RyanCavanaugh there that didn't work either

@ahejlsberg
Copy link
Member

I have manually added your extra test case in this commit. Thanks!

@ahejlsberg ahejlsberg deleted the branch microsoft:fix52068 January 6, 2023 17:18
@ahejlsberg ahejlsberg closed this Jan 6, 2023
@Andarist Andarist deleted the tests/extra-test-for-deferred-conditionals branch January 6, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants