In ES5+ reserved words are valid property names, and should not be munged

Description

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)`.

Environment

None

Assignee

Dominic Monroe

Reporter

Dominic Monroe

Labels

None

Approval

None

Patch

Code

Priority

Blocker
Configure