[d24f17c] | 1 | import { Iteration } from '../Iteration/Iteration';
|
---|
| 2 | import { IterationOf } from '../Iteration/IterationOf';
|
---|
| 3 | import { Pos } from '../Iteration/Pos';
|
---|
| 4 | import { Next } from '../Iteration/Next';
|
---|
| 5 | import { Length } from '../List/Length';
|
---|
| 6 | import { Cast } from '../Any/Cast';
|
---|
| 7 | import { List } from '../List/List';
|
---|
| 8 | import { Extends } from '../Any/Extends';
|
---|
| 9 | import { Depth } from './_Internal';
|
---|
| 10 | import { Patch } from './Patch';
|
---|
| 11 | import { BuiltIn } from '../Misc/BuiltIn';
|
---|
| 12 | /**
|
---|
| 13 | * @hidden
|
---|
| 14 | */
|
---|
| 15 | declare type __PatchAll<O extends object, Os extends List<object>, depth extends Depth, ignore extends object, fill extends any, I extends Iteration = IterationOf<0>> = {
|
---|
| 16 | 0: __PatchAll<Patch<O, Os[Pos<I>], depth, ignore, fill>, Os, depth, ignore, fill, Next<I>>;
|
---|
| 17 | 1: O;
|
---|
| 18 | }[Extends<Pos<I>, Length<Os>>];
|
---|
| 19 | /**
|
---|
| 20 | * @hidden
|
---|
| 21 | */
|
---|
| 22 | export declare type _PatchAll<O extends object, Os extends List<object>, depth extends Depth, ignore extends object, fill extends any> = __PatchAll<O, Os, depth, ignore, fill> extends infer X ? Cast<X, object> : never;
|
---|
| 23 | /**
|
---|
| 24 | * [[Patch]] a list of [[Object]]s into `O`. Patches from left to right, first
|
---|
| 25 | * items get completed by the next ones (last-in completes).
|
---|
| 26 | * @param O to start with
|
---|
| 27 | * @param Os to patch
|
---|
| 28 | * @param depth (?=`'flat'`) 'deep' to do it deeply
|
---|
| 29 | * @param ignore (?=`BuiltIn`) types not to merge
|
---|
| 30 | * @param fill (?=`never`) types of `O` to be replaced with ones of `O1`
|
---|
| 31 | * @returns [[Object]]
|
---|
| 32 | * @example
|
---|
| 33 | * ```ts
|
---|
| 34 | * ```
|
---|
| 35 | */
|
---|
| 36 | export declare type PatchAll<O extends object, Os extends List<object>, depth extends Depth = 'flat', ignore extends object = BuiltIn, fill extends any = never> = O extends unknown ? Os extends unknown ? _PatchAll<O, Os, depth, ignore, fill> : never : never;
|
---|
| 37 | export {};
|
---|