TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Declaration references expanded type paramater

Open dragomirtitian opened this issue 9 months ago • 0 comments

🔎 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

dragomirtitian avatar May 02 '24 20:05 dragomirtitian