зеркало из https://github.com/microsoft/tslib.git
Update __spreadArray helper (#151)
This commit is contained in:
Родитель
4f0f29bb9d
Коммит
1f2daa7383
|
@ -27,7 +27,7 @@ export declare function __read(o: any, n?: number): any[];
|
|||
export declare function __spread(...args: any[][]): any[];
|
||||
/** @deprecated since TypeScript 4.2 */
|
||||
export declare function __spreadArrays(...args: any[][]): any[];
|
||||
export declare function __spreadArray(to: any[], from: any[]): any[];
|
||||
export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[];
|
||||
export declare function __await(v: any): any;
|
||||
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
|
||||
export declare function __asyncDelegator(o: any): any;
|
||||
|
|
12
tslib.es6.js
12
tslib.es6.js
|
@ -162,10 +162,14 @@ export function __spreadArrays() {
|
|||
return r;
|
||||
}
|
||||
|
||||
export function __spreadArray(to, from) {
|
||||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||||
to[j] = from[i];
|
||||
return to;
|
||||
export function __spreadArray(to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || from);
|
||||
}
|
||||
|
||||
export function __await(v) {
|
||||
|
|
12
tslib.js
12
tslib.js
|
@ -203,10 +203,14 @@ var __createBinding;
|
|||
return r;
|
||||
};
|
||||
|
||||
__spreadArray = function (to, from) {
|
||||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||||
to[j] = from[i];
|
||||
return to;
|
||||
__spreadArray = function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || from);
|
||||
};
|
||||
|
||||
__await = function (v) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче