mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-25 08:06:22 +08:00
lodash: _.overEvery and _.overSome added
This commit is contained in:
@@ -9911,6 +9911,66 @@ namespace TestOver {
|
||||
}
|
||||
}
|
||||
|
||||
// _.overEvery
|
||||
namespace TestOverEvery {
|
||||
{
|
||||
let result: (...args: any[]) => boolean;
|
||||
|
||||
result = _.overEvery(() => true);
|
||||
result = _.overEvery(() => true, () => true);
|
||||
result = _.overEvery([() => true]);
|
||||
result = _.overEvery([() => true], [() => true]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
|
||||
result = _(Math.max).overEvery();
|
||||
result = _(Math.max).overEvery(() => true);
|
||||
result = _([Math.max]).overEvery();
|
||||
result = _([Math.max]).overEvery([() => true]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
|
||||
result = _(Math.max).chain().overEvery();
|
||||
result = _(Math.max).chain().overEvery(() => true);
|
||||
result = _([Math.max]).chain().overEvery();
|
||||
result = _([Math.max]).chain().overEvery([() => true]);
|
||||
}
|
||||
}
|
||||
|
||||
// _.overSome
|
||||
namespace TestOverSome {
|
||||
{
|
||||
let result: (...args: any[]) => boolean;
|
||||
|
||||
result = _.overSome(() => true);
|
||||
result = _.overSome(() => true, () => true);
|
||||
result = _.overSome([() => true]);
|
||||
result = _.overSome([() => true], [() => true]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
|
||||
result = _(Math.max).overSome();
|
||||
result = _(Math.max).overSome(() => true);
|
||||
result = _([Math.max]).overSome();
|
||||
result = _([Math.max]).overSome([() => true]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
|
||||
result = _(Math.max).chain().overSome();
|
||||
result = _(Math.max).chain().overSome(() => true);
|
||||
result = _([Math.max]).chain().overSome();
|
||||
result = _([Math.max]).chain().overSome([() => true]);
|
||||
}
|
||||
}
|
||||
|
||||
// _.property
|
||||
module TestProperty {
|
||||
interface SampleObject {
|
||||
|
||||
80
lodash/lodash.d.ts
vendored
80
lodash/lodash.d.ts
vendored
@@ -16235,6 +16235,86 @@ declare module _ {
|
||||
over<TResult>(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>;
|
||||
}
|
||||
|
||||
//_.overEvery
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a function that checks if all of the predicates return truthy when invoked with the arguments
|
||||
* provided to the created function.
|
||||
*
|
||||
* @param predicates The predicates to check.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
overEvery(...predicates: (Function|Function[])[]): (...args: any[]) => boolean;
|
||||
}
|
||||
|
||||
interface LoDashImplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.overEvery
|
||||
*/
|
||||
overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.overEvery
|
||||
*/
|
||||
overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.overEvery
|
||||
*/
|
||||
overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.overEvery
|
||||
*/
|
||||
overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
}
|
||||
|
||||
//_.overSome
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a function that checks if any of the predicates return truthy when invoked with the arguments
|
||||
* provided to the created function.
|
||||
*
|
||||
* @param predicates The predicates to check.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
overSome(...predicates: (Function|Function[])[]): (...args: any[]) => boolean;
|
||||
}
|
||||
|
||||
interface LoDashImplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.overSome
|
||||
*/
|
||||
overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.overSome
|
||||
*/
|
||||
overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.overSome
|
||||
*/
|
||||
overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.overSome
|
||||
*/
|
||||
overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
|
||||
}
|
||||
|
||||
//_.property
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user