Merge pull request #7756 from chrootsu/lodash-over

lodash: signatures of _.over added
This commit is contained in:
Masahiro Wakame
2016-01-25 12:27:32 +09:00
2 changed files with 70 additions and 0 deletions
+30
View File
@@ -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 {
+40
View File
@@ -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 {
/**