emptyArray
Matcher for an empty array.
Matchers are applied through assertObjectMatches, where they narrow the corresponding property type.
Type information that already exists in the calling scope is incorporated.
import { assertObjectMatches, emptyArray } from "@kensio/smartass";
const value: unknown = { errors: [],};
assertObjectMatches(value, { errors: emptyArray(),});
// value is now narrowed to an object with an empty errors array// {// errors: [];// }Source
Section titled “Source”Source file: src/assert/array-empty/array-empty.match.ts
