We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
This condition will always return true since the function is always defined
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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)
if (foo.test)
Actual behavior: no message
Playground Link: Example
It seems that happens when childSymbol.id and testedFunctionSymbol.id equal to undefined.
childSymbol.id
testedFunctionSymbol.id
undefined
if (childSymbol && childSymbol.id === testedFunctionSymbol.id)
The text was updated successfully, but these errors were encountered:
Using the playground link, after any change (for example add a space at start) the error appears.
Sorry, something went wrong.
Probably you already knows, but its a duplicate of #33792.
Yep, thanks @j-oliveras!
@sandersn I think it is similar to this issue #35557, however, it is not related to QF.
Maybe, but this issue is fixed in master, whereas #35557 is not. I assumed incorrectly that it was a result of #33792, but I guess not.
sandersn
No branches or pull requests
TypeScript Version: 3.8.3
Code
Expected behavior:
The message
This condition will always return true since the function is always defined
should be shown for the codeif (foo.test)
Actual behavior:
no message
Playground Link: Example
It seems that happens when
childSymbol.id
andtestedFunctionSymbol.id
equal toundefined
.The text was updated successfully, but these errors were encountered: