mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Add new baselines
This commit is contained in:
parent
4c73b2e7bd
commit
06c8506f96
@ -0,0 +1,11 @@
|
||||
// ==ORIGINAL==
|
||||
|
||||
function /*[#|*/f/*|]*/(): Promise<void>{
|
||||
return fetch('https://typescriptlang.org').then(([result]) => { console.log(result) });
|
||||
}
|
||||
// ==ASYNC FUNCTION::Convert to async function==
|
||||
|
||||
async function f(): Promise<void>{
|
||||
let [result] = await fetch('https://typescriptlang.org');
|
||||
console.log(result);
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
// ==ORIGINAL==
|
||||
|
||||
function /*[#|*/f/*|]*/(): Promise<void>{
|
||||
return fetch('https://typescriptlang.org').then(({ result }) => { console.log(result) });
|
||||
}
|
||||
// ==ASYNC FUNCTION::Convert to async function==
|
||||
|
||||
async function f(): Promise<void>{
|
||||
let { result } = await fetch('https://typescriptlang.org');
|
||||
console.log(result);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user