Skip to content

Removing binding aliases causes duplicate identifiers in declarations.Β #56991

@dragomirtitian

Description

@dragomirtitian

πŸ”Ž Search Terms

binding rename duplicate identifier

πŸ•— Version & Regression Information

  • This changed between versions 4.9 and 5.0

⏯ Playground Link

Playground Link

πŸ’» Code

export function fn2 ({ prop: a, prop: b }: { prop: number }) { };

πŸ™ Actual behavior

Declaration emit produces a signature with duplicate identifiers:

export declare function fn2({ prop, prop }: {
    prop: number;
}): void;

πŸ™‚ Expected behavior

Declaration emit produces a signature correct signature:

export declare function fn2({ prop }: {
    prop: number;
}): void;

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions