lodash: signatures of _.over have been changed

This commit is contained in:
Ilya Mochalov
2016-01-24 08:54:45 +05:00
parent 7fffbd3e04
commit 97a3b55245
2 changed files with 70 additions and 0 deletions
+30
View File
@@ -9830,6 +9830,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
@@ -16138,6 +16138,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 {
/**