Skip to content

Commit

Permalink
Address PR comments.
Browse files Browse the repository at this point in the history
1. Clean up __rest definition
2. Add __rest to tslib.es6.js
  • Loading branch information
sandersn committed Nov 11, 2016
1 parent f3120e8 commit 177a35e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion tslib.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ 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))
t[p] = s[p];
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);
Expand All @@ -43,4 +50,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());
});
};
};
4 changes: 2 additions & 2 deletions tslib.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ var __generator;
return t;
};

__rest = (this && this.__rest) || function (s, e) {
__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && !e.indexOf(p))
t[p] = s[p];
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;
Expand Down

0 comments on commit 177a35e

Please sign in to comment.