From c7987ae8199c70a9307cded1eaab979b88087ce3 Mon Sep 17 00:00:00 2001 From: iapyang Date: Tue, 31 Dec 2019 14:33:51 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-25852=20fix:=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index 114a26d8d..b2aaf3329 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -251,9 +251,9 @@ export interface _base { isNull: (obj: any) => obj is (undefined | null); - isEmptyArray: (arr: any[]) => boolean; + isEmptyArray: (arr: T[] | U) => arr is T[] & {length: 0}; - isNotEmptyArray: (arr: any[]) => boolean; + isNotEmptyArray: (arr: T[] | U) => arr is [T, ...T[]]; isEmptyObject: (obj: any) => obj is object; @@ -372,4 +372,4 @@ export interface _base { getDate: (...args: (number | string)[]) => Date; getTime: (...args: any[]) => number; -} \ No newline at end of file +}