TypeScript
TypeScript copied to clipboard
Declaration references expanded type paramater
🔎 Search Terms
expanded parameters isolated declarations
🕗 Version & Regression Information
- This changed between versions 5.4 and 5.5 beta
⏯ 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