import type { numarraymatrix } from "../types"; /** * Create a clone of the input array or matrix. * * Creates a deep copy of the input array or matrix. If the input is a number, it simply returns that number. * * @param x Array or matrix to clone. * @returns A deep copy of the input array or matrix. * @throws If no input is provided. * * @example Clone a matrix * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(clone([[-1, 3, -1], [4, 5, 9]]), [[-1, 3, -1], [4, 5, 9]]); * * ``` * * @example Clone an array * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(clone([5, 6, 3]), [5, 6, 3]); * * ``` * * @example Clone a single number * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(clone(5), 5); * * ``` */ export default function clone(x: T): T; //# sourceMappingURL=clone.d.ts.map