Closed
Description
There is no type checking on the implicit results of an await expression. To me this seems different than issue #2191.
/** @param {string} arg */
function strFn(arg) {}
async function asyncFn() {
const v = await Promise.resolve(5);
strFn(v); // Ignored
}
function callbackFn() {
Promise.resolve(5).then(strFn); // WARNING
}
I assume type checking is done post-transpilation in which case there needs to be casts within each generator switch statement. There is no type safety on the argument to the generator is the fundamental issue here.
Metadata
Metadata
Assignees
Labels
No labels