//#region src/Array/atOrThrow.d.ts /** * # atOrThrow * * ```ts * function Array.atOrThrow( * target: readonly T[], * offset: number, * ): Exclude * ``` * * Returns the value at the specified `offset`, throws an exception if the `offset` was out of range, or the retrieved value was nullable. * * ## Example * * ```ts [data-first] * import { Array } from "@monstermann/array"; * * Array.atOrThrow([1, null], -1); // Error * ``` * * ```ts [data-last] * import { Array } from "@monstermann/array"; * * pipe([1, null], Array.atOrThrow(-1)); // Error * ``` * */ declare const atOrThrow: { (offset: number): (target: readonly T[]) => Exclude; (target: readonly T[], offset: number): Exclude; }; //#endregion export { atOrThrow };