Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

object literal destructuring #49

@dariajung

Description

@dariajung

From Rado:

As discussed object literal destructuring cannot be handled well, because it contains a property 
declaration or access (things we rename) and a local variable expression (something we leave to
 uglifyJS).

var {a} = foo;

is sugar for

var a = foo.a;
which should be renamed to

var a = foo.$
but there is no way to do that while keeping the sugar.

Similarly for property declaration {a} is sugar for {a: a} and we rename that to {$: a}. 
For now I suggest we detect these and throw an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions