TypeScript Version: 1.8/Playground
Code
interfaceA{a: boolean;}interfaceB{b: boolean;}declareconstfooAB: (()=>A)&(()=>B);constab=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
TypeScript Version: 1.8/Playground
Code
Expected behavior:
abhas typeA & BActual behavior:
abhas typeAPerhaps this is being treated as an overloaded call signature, and
() => Ajust happens to be first. If this is by design, it would be great to learn about any known workarounds.cc kevinder