From 0fad808e8d8d163ab22df42d6469f4e01ddd0c1e Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Mon, 2 Jun 2014 16:41:45 -0400 Subject: [PATCH] Added TResult generic to chainable _(...).pluck methods This is needed because there is no way to cast the output in the middle of the chain. This is not be done on _.pluck() methods because T cannot be inferred. In other words, this: _.pluck(objectArray, 'id'); or this: var id: number = _.pluck(objectArray, 'id'); is cleaner than this: _.pluck(objectArray, 'id'); --- lodash/lodash.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 1c3f88155..8d373d993 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -3548,16 +3548,16 @@ declare module _ { /** * @see _.pluck **/ - pluck( - property: string): LoDashArrayWrapper; + pluck( + property: string): LoDashArrayWrapper; } interface LoDashObjectWrapper { /** * @see _.pluck **/ - pluck( - property: string): LoDashArrayWrapper; + pluck( + property: string): LoDashArrayWrapper; } //_.reduce