diff --git a/tslib.d.ts b/tslib.d.ts index 20221da..774e68b 100644 --- a/tslib.d.ts +++ b/tslib.d.ts @@ -14,8 +14,9 @@ and limitations under the License. ***************************************************************************** */ export declare function __extends(d: Function, b: Function): void; export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: string[]): any; export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; export declare function __param(paramIndex: number, decorator: Function): Function; export declare function __metadata(metadataKey: any, metadataValue: any): Function; export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; -export declare function __generator(thisArg: any, body: Function): any; \ No newline at end of file +export declare function __generator(thisArg: any, body: Function): any; diff --git a/tslib.es6.js b/tslib.es6.js index f9d7325..87717cb 100644 --- a/tslib.es6.js +++ b/tslib.es6.js @@ -21,6 +21,16 @@ export const __assign = Object.assign || function (t) { return t; }; +export const __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; + export const __decorate = function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); @@ -43,4 +53,4 @@ export const __awaiter = function (thisArg, _arguments, P, generator) { function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments)).next()); }); -}; \ No newline at end of file +}; diff --git a/tslib.js b/tslib.js index 4423782..b3556c3 100644 --- a/tslib.js +++ b/tslib.js @@ -15,6 +15,7 @@ and limitations under the License. /* global global, define, System, Reflect, Promise */ var __extends; var __assign; +var __rest; var __decorate; var __param; var __metadata; @@ -57,6 +58,16 @@ var __generator; return t; }; + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; + }; + __decorate = function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); @@ -111,9 +122,10 @@ var __generator; exporter("__extends", __extends); exporter("__assign", __assign); + exporter("__rest", __rest); exporter("__decorate", __decorate); exporter("__param", __param); exporter("__metadata", __metadata); exporter("__awaiter", __awaiter); exporter("__generator", __generator); -}); \ No newline at end of file +});