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
Typecheck on getMe() is failing . If you remove everything after AA, the issue disappears. As if the size of the original enum affects what Typescript does.
Uh oh!
There was an error while loading. Please reload this page.
🔎 Search Terms
The issue seems that the function
getMe()
is not able to deal with discriminating unions.However, it stops if I trim the enum and reduce the amount of values. Try removing everything after AA and the issue disappears.
It looks like a very convoluted example, but we really want this to work in our project.
My question is, why is the problem occurring?
🕗 Version & Regression Information
⏯ Playground Link
Link can be found here
💻 Code
🙁 Actual behavior
Typecheck on
getMe()
is failing . If you remove everything afterAA
, the issue disappears. As if the size of the original enum affects what Typescript does.🙂 Expected behavior
getMe()
should not be failing.Additional information about the issue
Playground link: https://www.typescriptlang.org/play/?#code/FAUwHgDg9gTgLgAhAOwK4FsEFECOqCWE6KcAKgJ4QgIDewCCAggDT0IBCrDAwlwgCJ8sfAGJ8A4nwASfAFJ8A0nwAyfALJ8AcnwDyfAAp8ASnwCKfAOp8AWn0Ys2jTo96PBj4Y7GPJjmcABfYFBIWEQ4SmpGAGdokDhuKHR0KGR+AEM4dIAeNlIkMDgUABNo7DxCYmQySIQAXnKCIhIKKmAAPnraNhAK5urWkAAuBFIAbkCJkOh4BAiqJi6YuISklLTM9IQAMm6GXqaqmqoR+ZAoADNGypbIgDpGCYCp8Bnw2vYl2PjE5NSMrI7PZIPpHQanSKXa79Y4gO7sJ4vUKzM4IbhfFa-dYAra7Oj7UG3E5zSFXXCHIlw7iI4LTMIkhb8DE-Nb-TZA-EgikDSIQqhQ8k3HlUO78Gl0lG1LDM1Z-DaAvE9QnC4YM85k5Wwu5YcWvemokQyrFshXAg5C2F89XQsH3ETi1EAZSoAGN8Bd8C7lvEcUsEAAfDiB9GBpmB6X++3BVHeuC+hrOkBuj1e75x9mB2PG+U5LBgF0AG1QxRA2UFMMGzAQieTntjOIA2gByc0VyJNgC67XaUxdqWiiAA5vE1NQGgAKVu24nl6cgACUI3r7LqnU5DBg8VQMGQwIY+65FsrbAYz0CQA
The text was updated successfully, but these errors were encountered: