mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Fix mergerino types and tests in preparation for TS #34742
This commit is contained in:
parent
5c945295c3
commit
03145003ff
2
types/mergerino/index.d.ts
vendored
2
types/mergerino/index.d.ts
vendored
@ -26,7 +26,7 @@ export type DeletePatch = undefined;
|
||||
* and the merge function as the second. The return value will be the replacement.
|
||||
* The value you return will bypass merging logic and simply overwrite the property.
|
||||
*/
|
||||
export type FunctionPatch<T> = (val: T, merge: Merge<T extends object ? T : never>) => T;
|
||||
export type FunctionPatch<T> = (val: Exclude<T, undefined>, merge: Merge<T extends object ? T : never>) => T;
|
||||
|
||||
/**
|
||||
* If you want to replace a array specify new array as the value.
|
||||
|
||||
@ -149,7 +149,7 @@ function multiArrayFalsyPatches() {
|
||||
0,
|
||||
null,
|
||||
(s, m) => m(s, { age: 10 }),
|
||||
[[[[[[[{ age: (x: number) => x * 3 }]]]]]]],
|
||||
[[[[{ age: x => x * 3 }]]]],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user