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
I realize subclassing Array in the past was a no-no, but it works perfectly well with CoffeeScript, and has been quite useful and performant.
Is there a way 6to5 could allow subclassing Array (and other built-ins?). NOT at the cost of the beautiful code generation .. but if its just that browser foo doesn't support, I'd be OK with that. And as I recall, es6 explicitly says we can subclass builtins.
The text was updated successfully, but these errors were encountered:
This is more of a limitation on ES5 engines than 6to5. For example, the behaviour wouldn't be consistent or predictable across the different JavaScript engines, happy to be proven wrong however.
The following works on v8 but I'm not giving any guarantees that it'll work anywhere else:
…l#106)
* Slightly simplify logic
* Implement ES2016 check for simple parameter list in strict mode
See e.g. ECMA-262 7.0 14.1.2:
> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
> IsSimpleParameterList of FormalParameters is false.
Similar clauses cover arrow functions, generator functions, methods, and
generator methods, as well as async functions and async arrow functions.
lockbot
added
the
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
label
Jan 19, 2019
lockbot
locked as resolved and limited conversation to collaborators
Jan 19, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue
I realize subclassing Array in the past was a no-no, but it works perfectly well with CoffeeScript, and has been quite useful and performant.
Is there a way 6to5 could allow subclassing Array (and other built-ins?). NOT at the cost of the beautiful code generation .. but if its just that browser foo doesn't support, I'd be OK with that. And as I recall, es6 explicitly says we can subclass builtins.
The text was updated successfully, but these errors were encountered: