6f7f3b1775
* Minor fixes to convertToAsync * Back out on nested return in inner continuation * Baseline update * Verify type argument for call can be used, add a few more early exit shortcuts
13 lines
292 B
TypeScript
13 lines
292 B
TypeScript
// ==ORIGINAL==
|
|
|
|
function /*[#|*/f/*|]*/() {
|
|
return fetch('https://typescriptlang.org').then(x => x.statusText).catch(undefined);
|
|
}
|
|
|
|
// ==ASYNC FUNCTION::Convert to async function==
|
|
|
|
async function f() {
|
|
const x = await fetch('https://typescriptlang.org');
|
|
return x.statusText;
|
|
}
|