UNPKG

447 BTypeScriptView Raw
1import { Key } from '../Any/Key';
2import { List } from './List';
3import { At } from '../Any/At';
4/**
5 * Make the fields of `L` union the ones of `L1`
6 * @param L to union from
7 * @param L1 to union with
8 * @param K (?=`Key`) to do choose fields
9 * @returns [[List]]
10 * @example
11 * ```ts
12 * ```
13 */
14export declare type Unionize<L extends List, L1 extends List, K extends Key = Key> = {
15 [P in keyof L]: P extends K ? L[P] | At<L1, P> : L[P];
16};