We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript Version: 3.9.2, 4.0.0-beta.20200724, nightly
Search Terms: generic union type circularly referencing itself
Code
class A<T> {} class B<T> {} type A_or_B<T> = A<T> | B<T> type C = A<C> | B<C> // Works fine type D = A_or_B<D> // Doesn't work :(
Expected behavior:
The code should compile.
Actual behavior:
It does not.
Playground Link: https://www.typescriptlang.org/play/#code/FAYwNghgzlAECCAeAKgPlgbwL6kjWAQiutsMAC4CeADgKYID6A9gE4NFqwC8CxsAPoWJkqdWAGFuvcekFEZsAPSLYAdVYBrOADMAlgDtaFGvQAiU+MzZFT6ZbFNNaUfQHJysAO6bYALgAUwEA
Related Issues: -
The text was updated successfully, but these errors were encountered:
Duplicate #41164 (comment); others
Sorry, something went wrong.
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
TypeScript Version: 3.9.2, 4.0.0-beta.20200724, nightly
Search Terms: generic union type circularly referencing itself
Code
Expected behavior:
The code should compile.
Actual behavior:
It does not.
Playground Link: https://www.typescriptlang.org/play/#code/FAYwNghgzlAECCAeAKgPlgbwL6kjWAQiutsMAC4CeADgKYID6A9gE4NFqwC8CxsAPoWJkqdWAGFuvcekFEZsAPSLYAdVYBrOADMAlgDtaFGvQAiU+MzZFT6ZbFNNaUfQHJysAO6bYALgAUwEA
Related Issues: -
The text was updated successfully, but these errors were encountered: