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();