Closed
Description
TypeScript Version: 3.8.3
Code
const foo = {
test() {
return true;
}
}
if (foo.test) {
console.log(true);
}
Expected behavior:
The message This condition will always return true since the function is always defined
should be shown for the code if (foo.test)
Actual behavior:
no message
Playground Link: Example
It seems that happens when childSymbol.id
and testedFunctionSymbol.id
equal to undefined
.
if (childSymbol && childSymbol.id === testedFunctionSymbol.id)