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
typeWeird=(<Uextendsboolean>(a: U)=>never)extends(<Uextendstrue>(a: U)=>never) ? never : never;
This type puts the type checker in some sort of weird state where it's never narrowed into anything useful. I assume the proper type should be booleannever.
The text was updated successfully, but these errors were encountered:
Sorry, yes, never, I changed the code slightly just before posting to try and demonstrate the bug better. I'll adjust the OP.
typeWeird=(<Uextendsboolean>(a: U)=>U)extends(<Uextendstrue>(a: U)=> infer T) ? T : never;
This was the original code, in which case the answer is boolean, but it confuses the issue, because the problem is due to the contraints, not due to anything to do with return types or infer.
This type puts the type checker in some sort of weird state where it's never narrowed into anything useful. I assume the proper type should be
boolean
never
.The text was updated successfully, but these errors were encountered: