Fix mergerino types and tests in preparation for TS #34742

This commit is contained in:
Anders Hejlsberg 2019-10-28 07:42:41 -04:00
parent 5c945295c3
commit 03145003ff
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -149,7 +149,7 @@ function multiArrayFalsyPatches() {
0,
null,
(s, m) => m(s, { age: 10 }),
[[[[[[[{ age: (x: number) => x * 3 }]]]]]]],
[[[[{ age: x => x * 3 }]]]],
);
}