From 03145003ff48cbb9f8f5a082111ec46ce44ec3a2 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 28 Oct 2019 07:42:41 -0400 Subject: [PATCH] Fix mergerino types and tests in preparation for TS #34742 --- types/mergerino/index.d.ts | 2 +- types/mergerino/mergerino-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/mergerino/index.d.ts b/types/mergerino/index.d.ts index f4a3431646..2ca5cbc712 100644 --- a/types/mergerino/index.d.ts +++ b/types/mergerino/index.d.ts @@ -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 = (val: T, merge: Merge) => T; +export type FunctionPatch = (val: Exclude, merge: Merge) => T; /** * If you want to replace a array specify new array as the value. diff --git a/types/mergerino/mergerino-tests.ts b/types/mergerino/mergerino-tests.ts index 43cc95a320..9e3613f898 100644 --- a/types/mergerino/mergerino-tests.ts +++ b/types/mergerino/mergerino-tests.ts @@ -149,7 +149,7 @@ function multiArrayFalsyPatches() { 0, null, (s, m) => m(s, { age: 10 }), - [[[[[[[{ age: (x: number) => x * 3 }]]]]]]], + [[[[{ age: x => x * 3 }]]]], ); }