source: node_modules/es-toolkit/dist/compat/object/omitBy.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.7 KB
Line 
1import { ValueKeyIteratee } from '../_internal/ValueKeyIteratee.mjs';
2
3/**
4 * Creates a new object composed of the properties that do not satisfy the predicate function.
5 *
6 * @template T
7 * @param {Record<string, T> | null | undefined} object - The source object.
8 * @param {ValueKeyIteratee<T>} predicate - The function invoked per property.
9 * @returns {Record<string, T>} Returns the new object.
10 *
11 * @example
12 * omitBy({ 'a': 1, 'b': '2', 'c': 3 }, isString);
13 * // => { 'a': 1, 'c': 3 }
14 */
15declare function omitBy<T>(object: Record<string, T> | null | undefined, predicate?: ValueKeyIteratee<T>): Record<string, T>;
16/**
17 * Creates a new object composed of the properties that do not satisfy the predicate function.
18 *
19 * @template T
20 * @param {Record<number, T> | null | undefined} object - The source object.
21 * @param {ValueKeyIteratee<T>} predicate - The function invoked per property.
22 * @returns {Record<number, T>} Returns the new object.
23 *
24 * @example
25 * omitBy({ 0: 1, 1: '2', 2: 3 }, isString);
26 * // => { 0: 1, 2: 3 }
27 */
28declare function omitBy<T>(object: Record<number, T> | null | undefined, predicate?: ValueKeyIteratee<T>): Record<number, T>;
29/**
30 * Creates a new object composed of the properties that do not satisfy the predicate function.
31 *
32 * @template T
33 * @param {T | null | undefined} object - The source object.
34 * @param {ValueKeyIteratee<T[keyof T]>} predicate - The function invoked per property.
35 * @returns {Partial<T>} Returns the new object.
36 *
37 * @example
38 * omitBy({ 'a': 1, 'b': '2', 'c': 3 }, isString);
39 * // => { 'a': 1, 'c': 3 }
40 */
41declare function omitBy<T extends object>(object: T | null | undefined, predicate: ValueKeyIteratee<T[keyof T]>): Partial<T>;
42
43export { omitBy };
Note: See TracBrowser for help on using the repository browser.