1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00
denoland-deno/testdata/012_async.ts
Ryan Dahl 7609df9d4f Support async/await by including ES2017
This required adjusting the module loading system.
2018-05-26 15:21:17 -04:00

11 lines
218 B
TypeScript

// Check that we can use the async keyword.
async function main() {
await new Promise((resolve, reject) => {
console.log("2");
setTimeout(resolve, 100);
});
console.log("3");
}
console.log("1");
main();