From 18fdbd98c7343f8c9fb54199adb40f60ace91484 Mon Sep 17 00:00:00 2001 From: Adam Kalman Date: Fri, 29 May 2015 14:52:58 -0700 Subject: [PATCH] 90296 add and fix tests add in a test for the new code, and make all the tests pass. --- lodash/lodash-tests.ts | 2 ++ lodash/lodash.d.ts | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 6a48e20c1..a265eda3b 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -143,6 +143,8 @@ result = _('test').value(); result = _([1, 2, 3]).value(); result = <_.Dictionary>_(<{ [index: string]: string; }>{ 'key1': 'test1', 'key2': 'test2' }).value(); +result = <_.Dictionary>_({ a: 1, b: 2}).mapValues(function(num: number) { return num * 2; }).value(); + // /************* // * Arrays * // *************/ diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index d06a993f9..81fd2c661 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6121,12 +6121,10 @@ declare module _ { /** * @see _.mapValues - * TResult is the type of the property specified by pluck. - * TResult has to extend Dictionary<> for this to return true. - * TResultValueType is the type of the properties on TResult. - * T should be a Dictionary> + * TResult is the type of the properties on the object specified by pluck. + * T should be a Dictionary>> */ - mapValues>(pluck: string, where: TResult): LoDashArrayWrapper>; + mapValues(pluck: string, where: Dictionary): LoDashArrayWrapper>; /** * @see _.mapValues