1 | # Installation
|
2 | > `npm install --save @types/object.omit`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for object.omit (https://github.com/jonschlinkert/object.omit).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object.omit.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object.omit/index.d.ts)
|
10 | ````ts
|
11 | type Omit<GType, GKeys extends keyof GType> = Pick<GType, Exclude<keyof GType, GKeys>>;
|
12 |
|
13 | /**
|
14 | * Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument."
|
15 | *
|
16 | * ```ts
|
17 | * omit({a: 'a', b: 'b', c: 'c'}, ['a', 'c'])
|
18 | * //=> { b: 'b' }
|
19 | * ```
|
20 | *
|
21 | * @param object
|
22 | * @param keys
|
23 | */
|
24 |
|
25 | declare function omit<GObject extends object, GKey extends keyof GObject>(
|
26 | object: GObject,
|
27 | key: GKey | GKey[],
|
28 | ): Omit<GObject, GKey>;
|
29 |
|
30 | declare function omit<GObject extends object, GKey extends keyof GObject>(
|
31 | object: GObject,
|
32 | fn: (value: GObject[GKey], key: GKey, obj: GObject) => boolean,
|
33 | ): { [key: string]: any };
|
34 |
|
35 | export = omit;
|
36 |
|
37 | ````
|
38 |
|
39 | ### Additional Details
|
40 | * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
|
41 | * Dependencies: none
|
42 |
|
43 | # Credits
|
44 | These definitions were written by [Ifiok Jr.](https://github.com/ifiokjr).
|
45 |
|
\ | No newline at end of file |