source: node_modules/es-toolkit/dist/compat/array/pullAll.d.mts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 1.2 KB
Line 
1import { MutableList } from '../_internal/MutableList.d.mjs';
2import { RejectReadonly } from '../_internal/RejectReadonly.d.mjs';
3
4/**
5 * This method is like `_.pull` except that it accepts an array of values to remove.
6 *
7 * **Note:** Unlike `_.difference`, this method mutates `array`.
8 *
9 * @template T
10 * @param {T[]} array - The array to modify.
11 * @param {ArrayLike<T>} [values] - The values to remove.
12 * @returns {T[]} Returns `array`.
13 *
14 * @example
15 * var array = [1, 2, 3, 1, 2, 3];
16 *
17 * pullAll(array, [2, 3]);
18 * console.log(array);
19 * // => [1, 1]
20 */
21declare function pullAll<T>(array: T[], values?: ArrayLike<T>): T[];
22/**
23 * This method is like `_.pull` except that it accepts an array of values to remove.
24 *
25 * **Note:** Unlike `_.difference`, this method mutates `array`.
26 *
27 * @template L
28 * @param {RejectReadonly<L>} array - The array to modify.
29 * @param {List<L[0]>} [values] - The values to remove.
30 * @returns {L} Returns `array`.
31 *
32 * @example
33 * var array = [1, 2, 3, 1, 2, 3];
34 *
35 * pullAll(array, [2, 3]);
36 * console.log(array);
37 * // => [1, 1]
38 */
39declare function pullAll<L extends MutableList<any>>(array: RejectReadonly<L>, values?: ArrayLike<L[0]>): L;
40
41export { pullAll };
Note: See TracBrowser for help on using the repository browser.