SystemJS top-level await support (#12163)

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
This commit is contained in:
Guy Bedford
2020-10-14 11:14:52 -07:00
committed by GitHub
parent d0d1fdb921
commit 9c7d9c0fe5
8 changed files with 61 additions and 4 deletions

View File

@@ -0,0 +1 @@
async () => await test;

View File

@@ -0,0 +1,10 @@
System.register([], function (_export, _context) {
"use strict";
return {
setters: [],
execute: function () {
async () => await test;
}
};
});

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "transform-modules-systemjs", "syntax-top-level-await"]
}

View File

@@ -0,0 +1,3 @@
if (maybe) {
await test;
}

View File

@@ -0,0 +1,12 @@
System.register([], function (_export, _context) {
"use strict";
return {
setters: [],
execute: async function () {
if (maybe) {
await test;
}
}
};
});

View File

@@ -0,0 +1,2 @@
await test;

View File

@@ -0,0 +1,10 @@
System.register([], function (_export, _context) {
"use strict";
return {
setters: [],
execute: async function () {
await test;
}
};
});