@types/object.omit
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -22,11 +22,11 @@ // Type definitions for object.omit 3.0 | ||
declare function omit<GObject extends object, GKey extends keyof GObject>( | ||
object: GObject, | ||
key: GKey | GKey[], | ||
object: GObject, | ||
key: GKey | GKey[], | ||
): Omit<GObject, GKey>; | ||
declare function omit<GObject extends object, GKey extends keyof GObject>( | ||
object: GObject, | ||
fn: (value: GObject[GKey], key: GKey, obj: GObject) => boolean, | ||
object: GObject, | ||
fn: (value: GObject[GKey], key: GKey, obj: GObject) => boolean, | ||
): { [key: string]: any }; | ||
export = omit; |
{ | ||
"name": "@types/object.omit", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "TypeScript definitions for object.omit", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object.omit", | ||
"license": "MIT", | ||
@@ -14,3 +15,3 @@ "contributors": [ | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -23,4 +24,4 @@ "type": "git", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "168e8481b7a782bf7c77fb6ba43139d707a16484f81e3c973d880615f3ecf477", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "22a4903efb02fd95c8a73bbbae97a2ed5882e4251d3a8951f36d9b428c0f6fa6", | ||
"typeScriptVersion": "4.3" | ||
} |
@@ -5,9 +5,44 @@ # Installation | ||
# Summary | ||
This package contains type definitions for object.omit ( https://github.com/jonschlinkert/object.omit ). | ||
This package contains type definitions for object.omit (https://github.com/jonschlinkert/object.omit). | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object.omit | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object.omit. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object.omit/index.d.ts) | ||
````ts | ||
// Type definitions for object.omit 3.0 | ||
// Project: https://github.com/jonschlinkert/object.omit | ||
// Definitions by: Ifiok Jr. <https://github.com/ifiokjr> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.8 | ||
Additional Details | ||
* Last updated: Tue, 16 Apr 2019 00:32:37 GMT | ||
type Omit<GType, GKeys extends keyof GType> = Pick<GType, Exclude<keyof GType, GKeys>>; | ||
/** | ||
* Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument." | ||
* | ||
* ```ts | ||
* omit({a: 'a', b: 'b', c: 'c'}, ['a', 'c']) | ||
* //=> { b: 'b' } | ||
* ``` | ||
* | ||
* @param object | ||
* @param keys | ||
*/ | ||
declare function omit<GObject extends object, GKey extends keyof GObject>( | ||
object: GObject, | ||
key: GKey | GKey[], | ||
): Omit<GObject, GKey>; | ||
declare function omit<GObject extends object, GKey extends keyof GObject>( | ||
object: GObject, | ||
fn: (value: GObject[GKey], key: GKey, obj: GObject) => boolean, | ||
): { [key: string]: any }; | ||
export = omit; | ||
```` | ||
### Additional Details | ||
* Last updated: Sun, 03 Sep 2023 22:33:46 GMT | ||
* Dependencies: none | ||
@@ -17,2 +52,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Ifiok Jr. <https://github.com/ifiokjr>. | ||
These definitions were written by [Ifiok Jr.](https://github.com/ifiokjr). |
Sorry, the diff of this file is not supported yet
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
4483
0
52