| [a762898] | 1 | import { MutableList } from '../_internal/MutableList.d.mjs';
|
|---|
| 2 | import { RejectReadonly } from '../_internal/RejectReadonly.d.mjs';
|
|---|
| 3 | import { ValueIteratee } from '../_internal/ValueIteratee.mjs';
|
|---|
| 4 |
|
|---|
| 5 | /**
|
|---|
| 6 | * Removes all specified values from an array using an iteratee function.
|
|---|
| 7 | *
|
|---|
| 8 | * This function changes `arr` in place.
|
|---|
| 9 | * If you want to remove values without modifying the original array, use `differenceBy`.
|
|---|
| 10 | *
|
|---|
| 11 | * @template T
|
|---|
| 12 | * @param {T[]} array - The array to modify.
|
|---|
| 13 | * @param {ArrayLike<T>} [values] - The values to remove.
|
|---|
| 14 | * @param {((value: T) => unknown) | PropertyKey | [PropertyKey, any] | Partial<T>} [iteratee] - The iteratee invoked per element.
|
|---|
| 15 | * @returns {T[]} Returns `array`.
|
|---|
| 16 | *
|
|---|
| 17 | * @example
|
|---|
| 18 | * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
|
|---|
| 19 | *
|
|---|
| 20 | * pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
|
|---|
| 21 | * console.log(array);
|
|---|
| 22 | * // => [{ 'x': 2 }]
|
|---|
| 23 | */
|
|---|
| 24 | declare function pullAllBy<T>(array: T[], values?: ArrayLike<T>, iteratee?: ValueIteratee<T>): T[];
|
|---|
| 25 | /**
|
|---|
| 26 | * Removes all specified values from an array using an iteratee function.
|
|---|
| 27 | *
|
|---|
| 28 | * This function changes `arr` in place.
|
|---|
| 29 | * If you want to remove values without modifying the original array, use `differenceBy`.
|
|---|
| 30 | *
|
|---|
| 31 | * @template L
|
|---|
| 32 | * @param {RejectReadonly<L>} array - The array to modify.
|
|---|
| 33 | * @param {ArrayLike<L[0]>} [values] - The values to remove.
|
|---|
| 34 | * @param {ValueIteratee<L[0]>} [iteratee] - The iteratee invoked per element.
|
|---|
| 35 | * @returns {L} Returns `array`.
|
|---|
| 36 | *
|
|---|
| 37 | * @example
|
|---|
| 38 | * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
|
|---|
| 39 | *
|
|---|
| 40 | * pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
|
|---|
| 41 | * console.log(array);
|
|---|
| 42 | * // => [{ 'x': 2 }]
|
|---|
| 43 | */
|
|---|
| 44 | declare function pullAllBy<L extends MutableList<any>>(array: RejectReadonly<L>, values?: ArrayLike<L[0]>, iteratee?: ValueIteratee<L[0]>): L;
|
|---|
| 45 | /**
|
|---|
| 46 | * Removes all specified values from an array using an iteratee function.
|
|---|
| 47 | *
|
|---|
| 48 | * This function changes `arr` in place.
|
|---|
| 49 | * If you want to remove values without modifying the original array, use `differenceBy`.
|
|---|
| 50 | *
|
|---|
| 51 | * @template T, U
|
|---|
| 52 | * @param {T[]} array - The array to modify.
|
|---|
| 53 | * @param {ArrayLike<U>} values - The values to remove.
|
|---|
| 54 | * @param {((value: T | U) => unknown) | PropertyKey | [PropertyKey, any] | Partial<T | U>} iteratee - The iteratee invoked per element.
|
|---|
| 55 | * @returns {T[]} Returns `array`.
|
|---|
| 56 | *
|
|---|
| 57 | * @example
|
|---|
| 58 | * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
|
|---|
| 59 | *
|
|---|
| 60 | * pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
|
|---|
| 61 | * console.log(array);
|
|---|
| 62 | * // => [{ 'x': 2 }]
|
|---|
| 63 | */
|
|---|
| 64 | declare function pullAllBy<T, U>(array: T[], values: ArrayLike<U>, iteratee: ValueIteratee<T | U>): T[];
|
|---|
| 65 | /**
|
|---|
| 66 | * Removes all specified values from an array using an iteratee function.
|
|---|
| 67 | *
|
|---|
| 68 | * This function changes `arr` in place.
|
|---|
| 69 | * If you want to remove values without modifying the original array, use `differenceBy`.
|
|---|
| 70 | *
|
|---|
| 71 | * @template L, U
|
|---|
| 72 | * @param {L} array - The array to modify.
|
|---|
| 73 | * @param {ArrayLike<U>} values - The values to remove.
|
|---|
| 74 | * @param {((value: L[0] | U) => unknown) | PropertyKey | [PropertyKey, any] | Partial<L[0] | U>} iteratee - The iteratee invoked per element.
|
|---|
| 75 | * @returns {L} Returns `array`.
|
|---|
| 76 | *
|
|---|
| 77 | * @example
|
|---|
| 78 | * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
|
|---|
| 79 | *
|
|---|
| 80 | * pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
|
|---|
| 81 | * console.log(array);
|
|---|
| 82 | * // => [{ 'x': 2 }]
|
|---|
| 83 | */
|
|---|
| 84 | declare function pullAllBy<L extends ArrayLike<any>, U>(array: L extends readonly any[] ? never : L, values: ArrayLike<U>, iteratee: ValueIteratee<L[0] | U>): L;
|
|---|
| 85 |
|
|---|
| 86 | export { pullAllBy };
|
|---|