From 7609df9d4f39dec83c633c23833ab8dfd8103ec1 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 26 May 2018 15:21:15 -0400 Subject: Support async/await by including ES2017 This required adjusting the module loading system. --- testdata/012_async.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 testdata/012_async.ts (limited to 'testdata/012_async.ts') diff --git a/testdata/012_async.ts b/testdata/012_async.ts new file mode 100644 index 000000000..57ae355c2 --- /dev/null +++ b/testdata/012_async.ts @@ -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(); -- cgit v1.2.3