import type { array } from "../types"; /** * Asserts that a value is a 1D array. * * Throws a TypeError if the input is not a 1D array. Uses TypeScript's type assertion to narrow the type. * * @param x The value to check * @throws If x is not a 1D array * * @example Valid array * ```ts * import { assertThrows } from "jsr:@std/assert"; * * assertarray([1, 2, 3]); // No error * * ``` * * @example Invalid input throws error * ```ts * import { assertThrows } from "jsr:@std/assert"; * * assertThrows(() => assertarray(5), TypeError, "Expected array"); * * ``` * * @example Matrix (2D array) throws error * ```ts * import { assertThrows } from "jsr:@std/assert"; * * assertThrows(() => assertarray([[1, 2], [3, 4]]), TypeError, "Expected array"); * ``` */ export default function assertarray(x: unknown): asserts x is array; //# sourceMappingURL=assertarray.d.ts.map