type GetAllValues<P1, P2> = {
[P in keyof P1 | keyof P2] : P1[P] | P2[P]
}
type F = GetAllValues<{ a: boolean; b: string; z: string }, { a: string; c: string; z: number }>;
Chciałem uzyskać wartość z 1 lub drugiego zbioru, i dostaje wiadomość
Type 'P' cannot be used to index type 'P1'.ts(2536)