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
Argument of type '{ a1: true; } | { a2: true; } | { a3: true; }' is not assignable to parameter of type '{ a1: true; } & { a2: true; } & { a3: true; }'.
Type '{ a1: true; }' is not assignable to type '{ a1: true; } & { a2: true; } & { a3: true; }'.
Property 'a2' is missing in type '{ a1: true; }' but required in type '{ a2: true; }'
π Expected behavior
No error. Or maybe I missed something, and this was intentional.
Seems like it was fixed in #47109 and broken in v4.7.
The text was updated successfully, but these errors were encountered:
Looks like something's going on when the mapped type is optional. This happened between 4.7.0-dev.20220302 and 4.7.0-dev.20220329. It would definitely be nice if this didn't stay broken in 4.7.x for long.
Yeah, this is a bug. We're being a bit too conservative in the isMappedTypeGenericIndexedAccess function. It disallows any ? modifiers when really it should only disallow -?. Easy fix, I'll have a PR up soon.
Bug Report
π Search Terms
indexed access types, mapped types
π Version & Regression Information
β― Playground Link
v4.8.0-dev.20220525 β
v4.7.0-beta β
v4.6.4 β
v4.5.5 β
π» Code
π Actual behavior
Got the following error:
π Expected behavior
No error. Or maybe I missed something, and this was intentional.
Seems like it was fixed in #47109 and broken in v4.7.
The text was updated successfully, but these errors were encountered: