4 ms·
Sorry, I did mean callee. Consider ``` const myIntValue = f(); ``` This code will silently break when f changes from sync to async.
by ashishb 7y ago
Sorry, I did mean callee.
Consider
```
const myIntValue = f();
```
This code will silently break when f changes from sync to async.
- bcherny 7y agoRight, but there will be an error where you consume myIntValue: const myIntValue = f() // Error TS2365: Operator '+' cannot be applied to types 'Promise<number>' and '2' const myResult = myIntValue + 2 async function f() { return 42 }