mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
Support async/await by including ES2017
This required adjusting the module loading system.
This commit is contained in:
parent
cbfb7d8720
commit
7609df9d4f
6 changed files with 53 additions and 15 deletions
11
testdata/012_async.ts
vendored
Normal file
11
testdata/012_async.ts
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
// 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();
|
Loading…
Add table
Add a link
Reference in a new issue