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
Record<K1, T> & Record<K2, U> is assignable to Record<K1 | K2, T & U> #64495
The return is accepted, and so is output.a.m. Key "a" is only present on Record<"a", { n: number }>, so its value is { n: 1 }. The return type claims it is { n: number } & { m: string }.
🙂 Expected behavior
The return should be an error. A key that belongs only to K1 has type T, and T is not assignable to T & U. output.a.m should be an error.
Activity
Fix unsound assignability of Record intersections (microsoft#64495)
Fix unsound assignability of Record intersections (microsoft#64495)