import type { Ary } from '../../internal/types/tools/index.js'; declare global { interface Array { /** * Takes elements from the array until the predicate returns `false`. * @param pred The predicate function. * * @example * ```typescript * [1, 2, 3, 4, 5].takeWhile((x) => x < 4); // => [1, 2, 3] * [1, 2, 3, 4, 5].takeWhile((x) => x > 10); // => [] * ``` */ takeWhile: ( this: AS, pred: (value: AS[number], index: number, array: AS) => boolean, ) => Ary.Mutate; } interface ReadonlyArray { /** * Takes elements from the array until the predicate returns `false`. * @param pred The predicate function. * * @example * ```typescript * [1, 2, 3, 4, 5].takeWhile((x) => x < 4); // => [1, 2, 3] * [1, 2, 3, 4, 5].takeWhile((x) => x > 10); // => [] * ``` */ takeWhile: ( this: AS, pred: (value: AS[number], index: number, array: AS) => boolean, ) => Ary.Mutate; } } //# sourceMappingURL=takeWhile.d.ts.map