Closed
Description
TypeScript Version: 3.1.0-dev.201xxxxx
Search Terms:
async, promise, code fix, code action, then
Code
function foo() {
return Promise.resolve().then(_ => Promise.resolve(4 + 5)).then(y => y + 5);
}
Expected behavior:
Async code fix produces
async function foo() {
await Promise.resolve();
const y = await Promise.resolve(4 + 5);
return y + 5;
}
Actual behavior:
Async code fix produces
async function foo() {
await Promise.resolve();
const y = Promise.resolve(4 + 5);
return y + 5;
}
Metadata
Metadata
Assignees
Labels
No labels