diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 408c78239a..00ca144fd2 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -646,6 +646,7 @@ result = _(stoogesAgesDict).sum('age'); result = _.pluck(stoogesAges, 'name'); result = _(stoogesAges).pluck('name').value(); +result = _.pluck(stoogesAges, ['name']); // _.partition result = _.partition('abcd', (n) => n < 'c'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 2e4d0154a0..77daeca2a1 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1092,16 +1092,16 @@ declare module _ { * @param values The values to remove. * @return array. **/ - pull( - array: Array, - ...values: any[]): any[]; + pull( + array: Array, + ...values: T[]): T[]; /** * @see _.pull **/ - pull( - array: List, - ...values: any[]): any[]; + pull( + array: List, + ...values: T[]): T[]; } interface LoDashStatic { @@ -1141,50 +1141,50 @@ declare module _ { * @param thisArg The this binding of callback. * @return A new array of removed elements. **/ - remove( - array: Array, - callback?: ListIterator, - thisArg?: any): any[]; + remove( + array: Array, + callback?: ListIterator, + thisArg?: any): T[]; /** * @see _.remove **/ - remove( - array: List, - callback?: ListIterator, - thisArg?: any): any[]; + remove( + array: List, + callback?: ListIterator, + thisArg?: any): T[]; /** * @see _.remove * @param pluckValue _.pluck style callback **/ - remove( - array: Array, - pluckValue?: string): any[]; + remove( + array: Array, + pluckValue?: string): T[]; /** * @see _.remove * @param pluckValue _.pluck style callback **/ - remove( - array: List, - pluckValue?: string): any[]; + remove( + array: List, + pluckValue?: string): T[]; /** * @see _.remove * @param whereValue _.where style callback **/ - remove( - array: Array, - wherealue?: Dictionary): any[]; + remove( + array: Array, + wherealue?: Dictionary): T[]; /** * @see _.remove * @param whereValue _.where style callback **/ - remove( - array: List, - wherealue?: Dictionary): any[]; + remove( + array: List, + wherealue?: Dictionary): T[]; /** * @see _.remove @@ -2494,7 +2494,7 @@ declare module _ { * @see _.fill */ fill( - value: any, + value: TResult, start?: number, end?: number): LoDashArrayWrapper; } @@ -2504,7 +2504,7 @@ declare module _ { * @see _.fill */ fill( - value: any, + value: TResult, start?: number, end?: number): LoDashObjectWrapper>; } @@ -4069,21 +4069,21 @@ declare module _ { **/ pluck( collection: Array, - property: string): any[]; + property: string|string[]): any[]; /** * @see _.pluck **/ pluck( collection: List, - property: string): any[]; + property: string|string[]): any[]; /** * @see _.pluck **/ pluck( collection: Dictionary, - property: string): any[]; + property: string|string[]): any[]; } interface LoDashArrayWrapper {