-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 1.8/Playground
Code
interface A {
a: boolean;
}
interface B {
b: boolean;
}
declare const fooAB: (() => A) & (() => B);
const ab = fooAB(); // AExpected behavior: ab has type A & B
Actual behavior: ab has type A
Perhaps this is being treated as an overloaded call signature, and () => A just happens to be first. If this is by design, it would be great to learn about any known workarounds.
cc @kevinder
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug