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
Regression: Indexed Access of Partial Mapped Type with Union from Generic Function is missing undefined #57487
Ryan Cavanaugh (@RyanCavanaugh) The mapped definition seems to work as intended ({ a?: number, b?: number }), as it does in all minor TypeScript versions since 3.3.3 (from the playground). Kinda surprised if that actually isn't expected behavior.
Activity
RyanCavanaugh commentedon Feb 22, 2024
Isn't the bug earlier? The type
{ [K in keyof Partial<Obj>]: Obj[K] }should be{ a: number, b: number }and the initialization from{ }should fail.3x071c commentedon Feb 22, 2024
Ryan Cavanaugh (@RyanCavanaugh) The
mappeddefinition seems to work as intended ({ a?: number, b?: number }), as it does in all minor TypeScript versions since 3.3.3 (from the playground). Kinda surprised if that actually isn't expected behavior.RyanCavanaugh commentedon Feb 22, 2024
Bisects to #47109
jcalz commentedon Feb 22, 2024
From here