You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The relevant criteria here is that the property concat is a function, and thus a method, not a getter/setter. I think we should basically special-case things that look like get/sets but whose type is Function.
(Technically it's possible to have a getter/setter that returns/accepts a function value, but I don't know of any instances of that across all the specs, and I doubt TypeScript has the type information to distinguish such cases. So, we'd probably need to handle them with a hard-coded list anyway, if such cases do exist.)
Similar, but different: consider
consta=[];a.concat=5;
This should not be rewritten at all. This code (which is bad code) creates a data property on a; it does not try to set or override Array.prototype.concat. We should let it do that, I guess. Or, we could just disallow it; whichever is easier.
The text was updated successfully, but these errors were encountered:
Seen in #56.
currently gets rewritten to
but should be rewritten to
The relevant criteria here is that the property
concat
is a function, and thus a method, not a getter/setter. I think we should basically special-case things that look like get/sets but whose type is Function.(Technically it's possible to have a getter/setter that returns/accepts a function value, but I don't know of any instances of that across all the specs, and I doubt TypeScript has the type information to distinguish such cases. So, we'd probably need to handle them with a hard-coded list anyway, if such cases do exist.)
Similar, but different: consider
This should not be rewritten at all. This code (which is bad code) creates a data property on
a
; it does not try to set or overrideArray.prototype.concat
. We should let it do that, I guess. Or, we could just disallow it; whichever is easier.The text was updated successfully, but these errors were encountered: