Open
Description
@ahejlsberg and I ran into something like this in the RWC. This currently repros on the nightlies.
function foo(x: Object | (() => string)) {
if (typeof x === "function") {
// Previously had no errors
x();
}
}
Expected: No error
Actual:
[ts] Cannot invoke an expression whose type lacks a call signature. Type '(() => string) | (Object & Function)' has no compatible call signatures.
Potentially related to #25243.