In ES5+ reserved words are valid property names, and should not be munged
Since ECMA-262 5ed, the property accessor syntax was changed to be an IdentifierName. IdentifierName allows for a reserved word to be used. Previously (in es3) it was a "Identifier" which excluded reserved keywords.
This means that it's valid ES5 to have a function named "delete" as long as it's part of a property. (e.g. delete() is invalid, but x.delete() is fine).
This affects interop forms like `(axios/delete)` or `(js/window.axios.delete)`.
I’ve attached the rough patch mentioned above for feedback. I’ve only tested as far as confirming the output looks how I’d like.
Yes. It’s a bit rough but I could share it now. I described it above in the hope of getting some feedback on whether the idea would work or not.
So a different patch than the one you originally submitted yes?
As far as I can tell from reading the ES3 spec, and looking at what Babel/TypeScript produce for ES3 this is perfectly valid. It won’t affect you on ES3 unless you explicitly call a form tagged as js using a reserved word.