//#region src/types/NonEmptyArray.d.ts /** * An array guaranteed to have at least one element. * The first element resolves to `T` instead of `T | undefined`. * * @template T - The type of the elements. * * @example * const a: NonEmptyArray = [1, 2, 3]; // ok * const b: NonEmptyArray = []; // error: empty array not allowed */ type NonEmptyArray = [T, ...T[]]; //#endregion export { NonEmptyArray };