mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
underscore pick can take keys as a rest param or an actual array of keys
This commit is contained in:
6
underscore/underscore.d.ts
vendored
6
underscore/underscore.d.ts
vendored
@@ -1030,9 +1030,8 @@ declare module _ {
|
||||
* @keys The key/value pairs to keep on `object`.
|
||||
* @return Copy of `object` with only the `keys` properties.
|
||||
**/
|
||||
export function pick(
|
||||
object: any,
|
||||
...keys: string[]): any;
|
||||
export function pick(object: any, ...keys: string[]): any;
|
||||
export function pick(object: any, keys: string[]): any;
|
||||
|
||||
/**
|
||||
* Return a copy of the object, filtered to omit the blacklisted keys (or array of keys).
|
||||
@@ -2648,6 +2647,7 @@ interface _Chain<T> {
|
||||
* @see _.pick
|
||||
**/
|
||||
pick(...keys: string[]): _Chain;
|
||||
pick(keys: string[]): _Chain;
|
||||
|
||||
/**
|
||||
* Wrapped type `object`.
|
||||
|
||||
Reference in New Issue
Block a user