We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TypeScript Version: 2.0.3
Code
function foo<A, B>(c:boolean, a:A, ab:A & B) { // foo return type is inferred to A instead of A | (A & B) return c ? a : ab; }
Expected behavior:
foo return type is inferred to A | (A & B)
Actual behavior:
foo return type is inferred to A