/** * Creates a slice of array with n elements dropped from the beginning. * * @param array - The array to query * @param n - The number of elements to drop * @returns Returns the slice of array * * @example * drop([1, 2, 3]); * // => [2, 3] * * drop([1, 2, 3], 2); * // => [3] * * drop([1, 2, 3], 5); * // => [] * * drop([1, 2, 3], 0); * // => [1, 2, 3] */ export declare function drop(array: readonly T[], n?: number): T[]; /** * Creates a slice of array with n elements dropped from the end. * * @param array - The array to query * @param n - The number of elements to drop * @returns Returns the slice of array * * @example * dropRight([1, 2, 3]); * // => [1, 2] * * dropRight([1, 2, 3], 2); * // => [1] * * dropRight([1, 2, 3], 5); * // => [] * * dropRight([1, 2, 3], 0); * // => [1, 2, 3] */ export declare function dropRight(array: readonly T[], n?: number): T[]; /** * Creates a slice of array excluding elements dropped from the beginning. * Elements are dropped until predicate returns falsy. * * @param array - The array to query * @param predicate - The function invoked per iteration * @returns Returns the slice of array * * @example * const users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * dropWhile(users, o => !o.active); * // => objects for ['pebbles'] */ export declare function dropWhile(array: readonly T[], predicate: (value: T, index: number, array: readonly T[]) => boolean): T[]; /** * Creates a slice of array excluding elements dropped from the end. * Elements are dropped until predicate returns falsy. * * @param array - The array to query * @param predicate - The function invoked per iteration * @returns Returns the slice of array * * @example * const users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': false } * ]; * * dropRightWhile(users, o => !o.active); * // => objects for ['barney'] */ export declare function dropRightWhile(array: readonly T[], predicate: (value: T, index: number, array: readonly T[]) => boolean): T[];