-
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
Conversation
@mhegazy do you know who is best to look at this? |
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 comment
The reason will be displayed to describe this comment to others. Learn more.
;;
double semicolon here
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.
You do not need the 'this' check here.
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.
fixed
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 comment
The reason will be displayed to describe this comment to others. Learn more.
You do not need the 'this' check here.
@@ -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)) |
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 about Symbol
keys.
I don't think this PR is the place to fix it regardless, because __extends
and __assign
already use for .. in
.
This doesn't update the |
1. Clean up __rest definition 2. Add __rest to tslib.es6.js
|
Done, @alitaheri thanks for the reminder. |
Any Updates on this? Feels like everything is in order. ❤️ |
No description provided.