source: node_modules/es-toolkit/dist/compat/array/pull.d.ts@ a762898

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

Added visualizations

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 * Removes all provided values from array using SameValueZero for equality comparisons.
3 *
4 * **Note:** Unlike `_.without`, this method mutates `array`.
5 *
6 * @template T
7 * @param {T[]} array - The array to modify.
8 * @param {...T[]} values - The values to remove.
9 * @returns {T[]} Returns `array`.
10 *
11 * @example
12 * var array = [1, 2, 3, 1, 2, 3];
13 *
14 * pull(array, 2, 3);
15 * console.log(array);
16 * // => [1, 1]
17 */
18declare function pull<T>(array: T[], ...values: T[]): T[];
19/**
20 * Removes all provided values from array using SameValueZero for equality comparisons.
21 *
22 * **Note:** Unlike `_.without`, this method mutates `array`.
23 *
24 * @template L
25 * @param {L} array - The array to modify.
26 * @param {...L[0][]} values - The values to remove.
27 * @returns {L} Returns `array`.
28 *
29 * @example
30 * var array = [1, 2, 3, 1, 2, 3];
31 *
32 * pull(array, 2, 3);
33 * console.log(array);
34 * // => [1, 1]
35 */
36declare function pull<L extends ArrayLike<any>>(array: L extends readonly any[] ? never : L, ...values: Array<L[0]>): L;
37
38export { pull };
Note: See TracBrowser for help on using the repository browser.