Destructuring: Add early errors for empty patterns?

Andreas Rossberg rossberg at
Thu Oct 22 00:44:24 UTC 2015

On 21 October 2015 at 20:19, Standards Zakas
<standards at> wrote:
> In playing with destructuring, it seems like there are some syntax gotchas
> that really should trigger some sort of error and instead fail silently. For
> instance:
> ```
> let {} = foo;
> ```
> This line does absolutely nothing

Not true. It checks that foo converts to an object, which may throw a
type error for null or undefined.


More information about the es-discuss mailing list