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 +}