From 3a54cb6c560686f92d792070b65889533fd81a3d Mon Sep 17 00:00:00 2001 From: pulsovi <47400514+pulsovi@users.noreply.github.com> Date: Mon, 21 Nov 2022 04:33:43 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#63337=20fix:=20dee?= =?UTF-8?q?p-extend:=20call=20the=20function=20with=20only=20one=20object?= =?UTF-8?q?=20by=20@pulsovi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: David GABISON --- types/deep-extend/deep-extend-tests.ts | 1 + types/deep-extend/index.d.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/types/deep-extend/deep-extend-tests.ts b/types/deep-extend/deep-extend-tests.ts index c8b1cf7e5e..8d2272255d 100644 --- a/types/deep-extend/deep-extend-tests.ts +++ b/types/deep-extend/deep-extend-tests.ts @@ -35,3 +35,4 @@ deepExtend(obj1, obj1, obj1, obj1, obj1, obj1); // More than 5 arguments deepExtend({ a: 1 }, { b: true }); // $ExpectType { a: number; } & { b: boolean; } // @ts-expect-error deepExtend({ a: 1 }, 1); +deepExtend({ a: 1 }); // $ExpectType { a: number; } diff --git a/types/deep-extend/index.d.ts b/types/deep-extend/index.d.ts index 5ce316eff4..3158bf09db 100644 --- a/types/deep-extend/index.d.ts +++ b/types/deep-extend/index.d.ts @@ -1,9 +1,11 @@ -// Type definitions for deep-extend 0.4 +// Type definitions for deep-extend 0.6 // Project: https://github.com/unclechu/node-deep-extend // Definitions by: rhysd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Minimum TypeScript Version: 3.9 /** Recursive object extending. */ +declare function deepExtend(target: T): T; declare function deepExtend(target: T, source: U): T & U; declare function deepExtend( target: T,