UNPKG

486 BTypeScriptView Raw
1import { Replace } from '../Union/Replace';
2import { x } from '../Any/x';
3import { List } from './List';
4import { Cast } from '../Any/Cast';
5import { At } from '../Any/At';
6/**
7 * Modify `L` with `LMod` & the [[x]] placeholder
8 * @param L to copy from
9 * @param LMod to copy to
10 * @returns [[List]]
11 * @example
12 * ```ts
13 * ```
14 */
15export declare type Modify<L extends List, LMod extends List> = Cast<{
16 [K in keyof LMod]: Replace<LMod[K], x, Exclude<At<L, K>, undefined>>;
17}, List>;