1import { throwIf } from '../throwErrorF/throwIfF.mts'23export function assertNonEmpty<T>(arr: T[] | undefined | null, debugCtx?: Record<string, unknown>): asserts arr is [T, ...T[]] {4 throwIf(() => !arr?.length, debugCtx)5}6