You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if there is an union type contains over 20 type, it will failed to assign the data to its property with the same type, even by itself.
🔎 Search Terms
🕗 Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about 4.5.2
and I also check next and nightly version, the bug still exist
There's no hard limit on the size of a union, but a union with more than 24 constituents can't be initialized by an expression which can only be shown to satisfy the union through explicit enumeration of possible values
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
if there is an union type contains over 20 type, it will failed to assign the data to its property with the same type, even by itself.
🔎 Search Terms
🕗 Version & Regression Information
and I also check next and nightly version, the bug still exist
⏯ Playground Link
https://www.typescriptlang.org/play?ts=4.6.0-dev.20211208#code/C4TwDgpgBAglC8UDeVSQFxQEQy1AvgNwBQa0AQgsquBJluXkabVAMJUpn1tMllQAIpxoZsgvi0hQAoiO7YZkgQDF5teiuWsA4urFYd26QAl9dbCePQAkufo3rUAFL3szpwGk3WT04AyPv5OALI+IU4Acj6RTgDyPnFOAAo+yU4Aij4ZTgBKPrlOAMo+RU4AKj7lTgCqPjVOAGo+jU4A6j5tTgAaPt1OAJo+A04AWj6jklLQMACMPrgE-Kzk84hcGtiMS9Psa9QKWLw7AoL7GwYSJ6wy56IWWErX0ip3h1rP0Dpvm4ZOJj8DFZPlAbICHo4Qc5wfQPCDPDDsH4Qf5EVhgiCQmiIiDImjYiC4mikiDkmj0iCMmiciDcmjCiCimiyiDymjqiCamiGiDGmjWiC2miuiDumj+iCBmiRiDRmjJjtdgBXAB2AEsAPYqhDEKB6qAAH1guv1RvIJr1RrYFsNQhtRpk9qgKidOidJidNidzidnid-idISdkSdcSdySdGSduSdRSd5SdNSdjSdbSd3SdAydoxIyvVWrWTrmTtWTrYsydZydtydr1dFf1toBnobppcrctUAR-o7tqxwd7RqJ4cHUCp0dHTPjo65ydHQvTo6l2dmuYAxlqAM7AKAAMw1GqoAAoAB6YVWalWzACU5-z2vgAD5kDaAE4QYBK1-apA2xsKE8ADoyAAGhtZhmGIDcVW3KAACMAENX2PM8oAvAtbzQ+8EGfX9G3fT9vygE8SEg6DYJPEAAC9j0w9CH1wt8Py-H8-31Q5cDAxsINzARNwAC1fNUVQAaxqbDEDgM1bQ4I1BGWaQBKE0TxMvfY5ltVYZPmOTV2IKCtx3fcNX2U9MCU4SxPvG9zMEyzVK1HCX3w5iiLwxt2M2IDQPA0iSCAA
💻 Code
🙁 Actual behavior
failed to assign
union1['type'] | union['type']
to union's type🙂 Expected behavior
it should enable the assignment;
The text was updated successfully, but these errors were encountered: