Skip to content

Unable to rename the property of destructuring assignment #15787

Description

@mhegazy

From #6312 (comment)

const x = 1;
const o = { x };
{
    const { x } = o;
    x;
}

Renaming any x will result in broken code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions