mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 22:55:36 -05:00
Add new baselines
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user