mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
90296 add and fix tests
add in a test for the new code, and make all the tests pass.
This commit is contained in:
@@ -143,6 +143,8 @@ result = <string>_('test').value();
|
||||
result = <number[]>_([1, 2, 3]).value();
|
||||
result = <_.Dictionary<string>>_(<{ [index: string]: string; }>{ 'key1': 'test1', 'key2': 'test2' }).value();
|
||||
|
||||
result = <_.Dictionary<number>>_({ a: 1, b: 2}).mapValues(function(num: number) { return num * 2; }).value();
|
||||
|
||||
// /*************
|
||||
// * Arrays *
|
||||
// *************/
|
||||
|
||||
Vendored
+3
-5
@@ -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<Dictionary<TResult>>
|
||||
* TResult is the type of the properties on the object specified by pluck.
|
||||
* T should be a Dictionary<Dictionary<Dictionary<TResult>>>
|
||||
*/
|
||||
mapValues<TResultValueType, TResult extends Dictionary<TResultValueType>>(pluck: string, where: TResult): LoDashArrayWrapper<Dictionary<boolean>>;
|
||||
mapValues<TResult>(pluck: string, where: Dictionary<TResult>): LoDashArrayWrapper<Dictionary<boolean>>;
|
||||
|
||||
/**
|
||||
* @see _.mapValues
|
||||
|
||||
Reference in New Issue
Block a user