1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -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();