Returns true if we can be sure the array is empty, false if we can be sure it's not, and boolean otherwise.
const arr = []type res = IsEmptyArray<typeof arr> // booleanconst arr = ["A"]type res = IsEmptyArray<typeof arr> // booleanconst arr = [] as const // orconst arr: [] = []type res = IsEmptyArray<typeof arr> // trueconst arr = ["A"] as const // orconst arr: ["A"] = ["A"]type res = IsEmptyArray<typeof arr> // false Copy
const arr = []type res = IsEmptyArray<typeof arr> // booleanconst arr = ["A"]type res = IsEmptyArray<typeof arr> // booleanconst arr = [] as const // orconst arr: [] = []type res = IsEmptyArray<typeof arr> // trueconst arr = ["A"] as const // orconst arr: ["A"] = ["A"]type res = IsEmptyArray<typeof arr> // false
Returns true if we can be sure the array is empty, false if we can be sure it's not, and boolean otherwise.