mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-14 22:10:30 +00:00
Fix mergerino types and tests in preparation for TS #34742
This commit is contained in:
Vendored
+1
-1
@@ -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 }]]]],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user