You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[4.9.5] Destructuring type inference fails on direct assignment, succeeds with intermediate variable #52629
The two step version works, the one step version fails with
Argument of type 'TestInterface' is not assignable to parameter of type 'ImageHolder<string>'.
Type 'TestInterface' is not assignable to type 'ImageRefHolder<string>'.
Index signature for type '`${string}_ref`' is missing in type 'TestInterface'.(2345)
so apparently narrowing down K fails.
🔎 Search Terms
Destructure, Destructuring assingment
🕗 Version & Regression Information
This is the behavior in every version I tried (down to 4.5.5)
Activity
Andarist commentedon Feb 6, 2023
Slimmed-down repro case:
RyanCavanaugh commentedon Feb 14, 2023
Caveat emptor - tagging bug/backlog since Andarist's PR seems plausible, but I haven't actually read this through