mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
forEachRight bindings and tests
This commit is contained in:
@@ -377,6 +377,12 @@ result = <LoDash.Dictionary<number>>_.forEachRight({ 'one': 1, 'two': 2, 'three'
|
||||
result = <number[]>_.eachRight([1, 2, 3], function(num) { console.log(num); });
|
||||
result = <LoDash.Dictionary<number>>_.eachRight({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); });
|
||||
|
||||
result = <LoDash.LoDashArrayWrapper<number>>_([1, 2, 3]).forEachRight(function(num) { console.log(num); });
|
||||
result = <LoDash.LoDashObjectWrapper<LoDash.Dictionary<number>>>_({ 'one': 1, 'two': 2, 'three': 3 }).forEachRight(function(num) { console.log(num); });
|
||||
|
||||
result = <LoDash.LoDashArrayWrapper<number>>_([1, 2, 3]).eachRight(function(num) { console.log(num); });
|
||||
result = <LoDash.LoDashObjectWrapper<LoDash.Dictionary<number>>>_({ 'one': 1, 'two': 2, 'three': 3 }).eachRight(function(num) { console.log(num); });
|
||||
|
||||
result = <LoDash.Dictionary<number[]>>_.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); });
|
||||
result = <LoDash.Dictionary<number[]>>_.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math);
|
||||
result = <LoDash.Dictionary<string[]>>_.groupBy(['one', 'two', 'three'], 'length');
|
||||
|
||||
Vendored
+38
-3
@@ -1589,7 +1589,7 @@ declare module LoDash {
|
||||
thisArg?: any): List<T>;
|
||||
|
||||
/**
|
||||
* @see _.each
|
||||
* @see _.forEachRight
|
||||
**/
|
||||
forEachRight<T extends {}>(
|
||||
object: Dictionary<T>,
|
||||
@@ -1597,7 +1597,7 @@ declare module LoDash {
|
||||
thisArg?: any): Dictionary<T>;
|
||||
|
||||
/**
|
||||
* @see _.each
|
||||
* @see _.forEachRight
|
||||
**/
|
||||
eachRight<T>(
|
||||
collection: List<T>,
|
||||
@@ -1605,7 +1605,7 @@ declare module LoDash {
|
||||
thisArg?: any): List<T>;
|
||||
|
||||
/**
|
||||
* @see _.each
|
||||
* @see _.forEachRight
|
||||
* @param object The object to iterate over
|
||||
* @param callback The function called per iteration.
|
||||
* @param thisArg The this binding of callback.
|
||||
@@ -1616,6 +1616,41 @@ declare module LoDash {
|
||||
thisArg?: any): Dictionary<T>;
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.forEachRight
|
||||
**/
|
||||
forEachRight<T>(
|
||||
callback: ListIterator<T, void >,
|
||||
thisArg?: any): LoDashArrayWrapper<List<T>>;
|
||||
|
||||
/**
|
||||
* @see _.forEachRight
|
||||
**/
|
||||
eachRight<T>(
|
||||
callback: ListIterator<T, void >,
|
||||
thisArg?: any): LoDashArrayWrapper<List<T>>;
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.forEachRight
|
||||
**/
|
||||
forEachRight<T extends {}>(
|
||||
callback: ObjectIterator<T, void >,
|
||||
thisArg?: any): LoDashObjectWrapper<Dictionary<T>>;
|
||||
|
||||
/**
|
||||
* @see _.forEachRight
|
||||
* @param object The object to iterate over
|
||||
* @param callback The function called per iteration.
|
||||
* @param thisArg The this binding of callback.
|
||||
**/
|
||||
eachRight<T extends {}>(
|
||||
callback: ObjectIterator<T, void>,
|
||||
thisArg?: any): LoDashObjectWrapper<Dictionary<T>>;
|
||||
}
|
||||
|
||||
//_.groupBy
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user