Closed
Description
TypeScript Version: 3.7.0-dev.20191003
Search Terms:
- quick fix
- code action
- function
- missing call
Code
const val = {
isTrue() { return true; }
}
if (val.isTrue) {
console.log(true);
}
This code produces the error: This condition will always return true since the function is always defined. Did you mean to call it instead?
for the conditional
Expected behavior:
A quick fix to add the missing call is returned. This would change the code to:
const val = {
isTrue() { return true; }
}
if (val.isTrue()) {
console.log(true);
}
Actual behavior:
No quick fixes