const emptyNumbers: readonly number[] = [] as const;
const words = ['Ada', 'Lovelace'] as const;
assert.isTrue(Arr.isEmpty(emptyNumbers));
assert.isFalse(Arr.isEmpty(words));
if (Arr.isEmpty(emptyNumbers)) {
// `isEmpty` narrows to the branded `FixedLengthArray<0, number>`, so the
// expected value is annotated with the unbranded type.
assert.deepStrictEqual<readonly number[]>(emptyNumbers, []);
}
Type guard that checks if an array is empty.