Skip to content

Removing binding aliases causes duplicate identifiers in declarations. #56991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dragomirtitian opened this issue Jan 9, 2024 · 0 comments Β· Fixed by #57020
Closed

Removing binding aliases causes duplicate identifiers in declarations. #56991

dragomirtitian opened this issue Jan 9, 2024 · 0 comments Β· Fixed by #57020
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@dragomirtitian
Copy link
Contributor

πŸ”Ž 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants