mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
80 lines
1.7 KiB
TypeScript
80 lines
1.7 KiB
TypeScript
//// [tests/cases/compiler/es5-asyncFunctionArrayLiterals.ts] ////
|
|
|
|
//// [es5-asyncFunctionArrayLiterals.ts]
|
|
declare var x, y, z, a;
|
|
|
|
async function arrayLiteral0() {
|
|
x = [await y, z];
|
|
}
|
|
|
|
async function arrayLiteral1() {
|
|
x = [y, await z];
|
|
}
|
|
|
|
async function arrayLiteral2() {
|
|
x = [...(await y), z];
|
|
}
|
|
|
|
async function arrayLiteral3() {
|
|
x = [...y, await z];
|
|
}
|
|
|
|
async function arrayLiteral4() {
|
|
x = [await y, ...z];
|
|
}
|
|
|
|
async function arrayLiteral5() {
|
|
x = [y, ...(await z)];
|
|
}
|
|
|
|
async function arrayLiteral6() {
|
|
x = [y, await z, a];
|
|
}
|
|
|
|
async function arrayLiteral7() {
|
|
x = [await y, z, await a];
|
|
}
|
|
|
|
//// [es5-asyncFunctionArrayLiterals.js]
|
|
"use strict";
|
|
function arrayLiteral0() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
x = [yield y, z];
|
|
});
|
|
}
|
|
function arrayLiteral1() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
x = [y, yield z];
|
|
});
|
|
}
|
|
function arrayLiteral2() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
x = [...(yield y), z];
|
|
});
|
|
}
|
|
function arrayLiteral3() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
x = [...y, yield z];
|
|
});
|
|
}
|
|
function arrayLiteral4() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
x = [yield y, ...z];
|
|
});
|
|
}
|
|
function arrayLiteral5() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
x = [y, ...(yield z)];
|
|
});
|
|
}
|
|
function arrayLiteral6() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
x = [y, yield z, a];
|
|
});
|
|
}
|
|
function arrayLiteral7() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
x = [yield y, z, yield a];
|
|
});
|
|
}
|