-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: Update how wrapped functions are detected as native functions #1106
Conversation
So I was looking at this before and I rejected doing it for a reason. I do not remember which one :( Let me recollect my thoughts before I approve this. |
Sure, I'm not quite convinced if this is the best solution as well. |
@benvinegar maybe you can chime in? |
eslint doesn't know who it's dealing with 😂 |
Apart from the general approach, shouldn't you invoke |
@jan-auer it's the same call when it comes to type coercion in JS function foo () {
return 'hello'
}
foo.toString()
// "function foo() {
// return 'hello'
// }"
Function.prototype.toString.apply(foo)
// "function foo() {
// return 'hello'
// }" also: foo.toString === Function.prototype.toString
// true |
@kamilogorek I get that. But you're patching toString for those functions - I assume (?) - and then calling the non-patched version in tests. |
No, I patch |
gotcha |
Approved via Slack |
Ref: #1104
Based on: angular/zone.js#686