-
Notifications
You must be signed in to change notification settings - Fork 137
Add __rest helper #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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,13 @@ var __generator; | |
return t; | ||
}; | ||
|
||
__rest = (this && this.__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; | ||
};; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You do not need the 'this' check here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
|
||
__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 +119,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); | ||
}); | ||
}); |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This skips over enumerable
Symbol
keys (but this probably should be a bug against TypeScript instead)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the fix be
getOwnPropertyDescriptors
? I don't know that much aboutSymbol
keys.I don't think this PR is the place to fix it regardless, because
__extends
and__assign
already usefor .. in
.