mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #7756 from chrootsu/lodash-over
lodash: signatures of _.over added
This commit is contained in:
@@ -9847,6 +9847,36 @@ module TestNoop {
|
||||
}
|
||||
}
|
||||
|
||||
// _.over
|
||||
namespace TestOver {
|
||||
{
|
||||
let result: (...args: any[]) => number[];
|
||||
|
||||
result = _.over<number>(Math.max);
|
||||
result = _.over<number>(Math.max, Math.min);
|
||||
result = _.over<number>([Math.max]);
|
||||
result = _.over<number>([Math.max], [Math.min]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => number[]>;
|
||||
|
||||
result = _(Math.max).over<number>();
|
||||
result = _(Math.max).over<number>(Math.min);
|
||||
result = _([Math.max]).over<number>();
|
||||
result = _([Math.max]).over<number>([Math.min]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => number[]>;
|
||||
|
||||
result = _(Math.max).chain().over<number>();
|
||||
result = _(Math.max).chain().over<number>(Math.min);
|
||||
result = _([Math.max]).chain().over<number>();
|
||||
result = _([Math.max]).chain().over<number>([Math.min]);
|
||||
}
|
||||
}
|
||||
|
||||
// _.property
|
||||
module TestProperty {
|
||||
interface SampleObject {
|
||||
|
||||
Vendored
+40
@@ -16161,6 +16161,46 @@ declare module _ {
|
||||
noop(...args: any[]): _.LoDashExplicitWrapper<void>;
|
||||
}
|
||||
|
||||
//_.over
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a function that invokes iteratees with the arguments provided to the created function and returns
|
||||
* their results.
|
||||
*
|
||||
* @param iteratees The iteratees to invoke.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
over<TResult>(...iteratees: (Function|Function[])[]): (...args: any[]) => TResult[];
|
||||
}
|
||||
|
||||
interface LoDashImplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.over
|
||||
*/
|
||||
over<TResult>(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.over
|
||||
*/
|
||||
over<TResult>(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.over
|
||||
*/
|
||||
over<TResult>(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.over
|
||||
*/
|
||||
over<TResult>(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>;
|
||||
}
|
||||
|
||||
//_.property
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user