3 ms·
Right, but there will be an error where you consume myIntValue: const myIntValue = f() // Error TS2365: Operator '+' cannot be applied to types 'Promise
by bcherny 7y ago
Right, 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
}