assertArrayEmpty
Assert that an array has no elements, with type-narrowing.
The failure message names the elements that are present, which is usually the diagnostic the assertion exists to produce.
import { assertArrayEmpty } from "@kensio/smartass";
const value: unknown = [];
assertArrayEmpty(value);
// value is now narrowed to an empty arraySource
Section titled “Source”Source file: src/assert/array-empty/array-empty.assert.ts
