mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
_(...).max, min
This commit is contained in:
@@ -476,10 +476,16 @@ result = <IStoogesAge[]>_(stoogesAges).collect('name').value();
|
||||
result = <number>_.max([4, 2, 8, 6]);
|
||||
result = <IStoogesAge>_.max(stoogesAges, function (stooge) { return stooge.age; });
|
||||
result = <IStoogesAge>_.max(stoogesAges, 'age');
|
||||
result = <_.LoDashWrapper<number>>_([4, 2, 8, 6]).max();
|
||||
result = <_.LoDashWrapper<IStoogesAge>>_(stoogesAges).max(function (stooge) { return stooge.age; });
|
||||
result = <_.LoDashWrapper<IStoogesAge>>_(stoogesAges).max('age');
|
||||
|
||||
result = <number>_.min([4, 2, 8, 6]);
|
||||
result = <IStoogesAge>_.min(stoogesAges, function (stooge) { return stooge.age; });
|
||||
result = <IStoogesAge>_.min(stoogesAges, 'age');
|
||||
result = <_.LoDashWrapper<number>>_([4, 2, 8, 6]).min();
|
||||
result = <_.LoDashWrapper<IStoogesAge>>_(stoogesAges).min(function (stooge) { return stooge.age; });
|
||||
result = <_.LoDashWrapper<IStoogesAge>>_(stoogesAges).min('age');
|
||||
|
||||
result = <string[]>_.pluck(stoogesAges, 'name');
|
||||
result = <string[]>_(stoogesAges).pluck('name').value();
|
||||
|
||||
Vendored
+46
@@ -3654,6 +3654,29 @@ declare module _ {
|
||||
whereValue: W): T;
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.max
|
||||
**/
|
||||
max(
|
||||
callback?: ListIterator<T, any>,
|
||||
thisArg?: any): LoDashWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.max
|
||||
* @param pluckValue _.pluck style callback
|
||||
**/
|
||||
max(
|
||||
pluckValue: string): LoDashWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.max
|
||||
* @param whereValue _.where style callback
|
||||
**/
|
||||
max<W>(
|
||||
whereValue: W): LoDashWrapper<T>;
|
||||
}
|
||||
|
||||
//_.min
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -3742,6 +3765,29 @@ declare module _ {
|
||||
whereValue: W): T;
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.min
|
||||
**/
|
||||
min(
|
||||
callback?: ListIterator<T, any>,
|
||||
thisArg?: any): LoDashWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.min
|
||||
* @param pluckValue _.pluck style callback
|
||||
**/
|
||||
min(
|
||||
pluckValue: string): LoDashWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.min
|
||||
* @param whereValue _.where style callback
|
||||
**/
|
||||
min<W>(
|
||||
whereValue: W): LoDashWrapper<T>;
|
||||
}
|
||||
|
||||
//_.pluck
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user