14 lines
339 B
TypeScript
14 lines
339 B
TypeScript
//// [arrayLiteralInNonVarArgParameter.ts]
|
|
function panic(val: string[], ...opt: string[]) { }
|
|
|
|
panic([], 'one', 'two');
|
|
|
|
|
|
//// [arrayLiteralInNonVarArgParameter.js]
|
|
function panic(val) {
|
|
var opt = [];
|
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
opt[_i - 1] = arguments[_i];
|
|
}
|
|
}
|
|
panic([], 'one', 'two');
|