Skip to content
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

Declaration references expanded type paramater #58408

Closed
dragomirtitian opened this issue May 2, 2024 · 0 comments Β· Fixed by #58409
Closed

Declaration references expanded type paramater #58408

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

Comments

@dragomirtitian
Copy link
Contributor

πŸ”Ž Search Terms

expanded parameters isolated declarations

πŸ•— Version & Regression Information

  • This changed between versions 5.4 and 5.5 beta

⏯ Playground Link

Playground Link

πŸ’» Code

// @declaration: true
// @target: es2015

export const v1 = (...a: [n: "n", a: "a"]): {
    /** rest param */
    a: typeof a,
} => {
    return null!
}

πŸ™ Actual behavior

typeof a is emitted even though the expanded declaration no longer contains it

πŸ™‚ Expected behavior

typeof a should be inlined

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