mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
lodash: signatures of the method _.some have been changed
This commit is contained in:
+110
-62
@@ -2037,43 +2037,67 @@ module TestAny {
|
||||
let listIterator: (value: TResult, index: number, collection: _.List<TResult>) => boolean;
|
||||
let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary<TResult>) => boolean;
|
||||
|
||||
let result: boolean;
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
result = _.any<TResult>(array);
|
||||
result = _.any<TResult>(array, listIterator);
|
||||
result = _.any<TResult>(array, listIterator, any);
|
||||
result = _.any<TResult>(array, '');
|
||||
result = _.any<{a: number}, TResult>(array, {a: 42});
|
||||
result = _.any<TResult>(array);
|
||||
result = _.any<TResult>(array, listIterator);
|
||||
result = _.any<TResult>(array, listIterator, any);
|
||||
result = _.any<TResult>(array, '');
|
||||
result = _.any<{a: number}, TResult>(array, {a: 42});
|
||||
|
||||
result = _.any<TResult>(list);
|
||||
result = _.any<TResult>(list, listIterator);
|
||||
result = _.any<TResult>(list, listIterator, any);
|
||||
result = _.any<TResult>(list, '');
|
||||
result = _.any<{a: number}, TResult>(list, {a: 42});
|
||||
result = _.any<TResult>(list);
|
||||
result = _.any<TResult>(list, listIterator);
|
||||
result = _.any<TResult>(list, listIterator, any);
|
||||
result = _.any<TResult>(list, '');
|
||||
result = _.any<{a: number}, TResult>(list, {a: 42});
|
||||
|
||||
result = _.any<TResult>(dictionary);
|
||||
result = _.any<TResult>(dictionary, dictionaryIterator);
|
||||
result = _.any<TResult>(dictionary, dictionaryIterator, any);
|
||||
result = _.any<TResult>(dictionary, '');
|
||||
result = _.any<{a: number}, TResult>(dictionary, {a: 42});
|
||||
result = _.any<TResult>(dictionary);
|
||||
result = _.any<TResult>(dictionary, dictionaryIterator);
|
||||
result = _.any<TResult>(dictionary, dictionaryIterator, any);
|
||||
result = _.any<TResult>(dictionary, '');
|
||||
result = _.any<{a: number}, TResult>(dictionary, {a: 42});
|
||||
|
||||
result = _(array).any();
|
||||
result = _(array).any(listIterator);
|
||||
result = _(array).any(listIterator, any);
|
||||
result = _(array).any('');
|
||||
result = _(array).any<{a: number}>({a: 42});
|
||||
result = _(array).any();
|
||||
result = _(array).any(listIterator);
|
||||
result = _(array).any(listIterator, any);
|
||||
result = _(array).any('');
|
||||
result = _(array).any<{a: number}>({a: 42});
|
||||
|
||||
result = _(list).any<TResult>();
|
||||
result = _(list).any<TResult>(listIterator);
|
||||
result = _(list).any<TResult>(listIterator, any);
|
||||
result = _(list).any('');
|
||||
result = _(list).any<{a: number}>({a: 42});
|
||||
result = _(list).any<TResult>();
|
||||
result = _(list).any<TResult>(listIterator);
|
||||
result = _(list).any<TResult>(listIterator, any);
|
||||
result = _(list).any('');
|
||||
result = _(list).any<{a: number}>({a: 42});
|
||||
|
||||
result = _(dictionary).any<TResult>();
|
||||
result = _(dictionary).any<TResult>(dictionaryIterator);
|
||||
result = _(dictionary).any<TResult>(dictionaryIterator, any);
|
||||
result = _(dictionary).any('');
|
||||
result = _(dictionary).any<{a: number}>({a: 42});
|
||||
result = _(dictionary).any<TResult>();
|
||||
result = _(dictionary).any<TResult>(dictionaryIterator);
|
||||
result = _(dictionary).any<TResult>(dictionaryIterator, any);
|
||||
result = _(dictionary).any('');
|
||||
result = _(dictionary).any<{a: number}>({a: 42});
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<boolean>;
|
||||
|
||||
result = _(array).chain().any();
|
||||
result = _(array).chain().any(listIterator);
|
||||
result = _(array).chain().any(listIterator, any);
|
||||
result = _(array).chain().any('');
|
||||
result = _(array).chain().any<{a: number}>({a: 42});
|
||||
|
||||
result = _(list).chain().any<TResult>();
|
||||
result = _(list).chain().any<TResult>(listIterator);
|
||||
result = _(list).chain().any<TResult>(listIterator, any);
|
||||
result = _(list).chain().any('');
|
||||
result = _(list).chain().any<{a: number}>({a: 42});
|
||||
|
||||
result = _(dictionary).chain().any<TResult>();
|
||||
result = _(dictionary).chain().any<TResult>(dictionaryIterator);
|
||||
result = _(dictionary).chain().any<TResult>(dictionaryIterator, any);
|
||||
result = _(dictionary).chain().any('');
|
||||
result = _(dictionary).chain().any<{a: number}>({a: 42});
|
||||
}
|
||||
}
|
||||
|
||||
// _.at
|
||||
@@ -2686,43 +2710,67 @@ module TestSome {
|
||||
let listIterator: (value: TResult, index: number, collection: _.List<TResult>) => boolean;
|
||||
let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary<TResult>) => boolean;
|
||||
|
||||
let result: boolean;
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
result = _.some<TResult>(array);
|
||||
result = _.some<TResult>(array, listIterator);
|
||||
result = _.some<TResult>(array, listIterator, any);
|
||||
result = _.some<TResult>(array, '');
|
||||
result = _.some<{a: number}, TResult>(array, {a: 42});
|
||||
result = _.some<TResult>(array);
|
||||
result = _.some<TResult>(array, listIterator);
|
||||
result = _.some<TResult>(array, listIterator, any);
|
||||
result = _.some<TResult>(array, '');
|
||||
result = _.some<{a: number}, TResult>(array, {a: 42});
|
||||
|
||||
result = _.some<TResult>(list);
|
||||
result = _.some<TResult>(list, listIterator);
|
||||
result = _.some<TResult>(list, listIterator, any);
|
||||
result = _.some<TResult>(list, '');
|
||||
result = _.some<{a: number}, TResult>(list, {a: 42});
|
||||
result = _.some<TResult>(list);
|
||||
result = _.some<TResult>(list, listIterator);
|
||||
result = _.some<TResult>(list, listIterator, any);
|
||||
result = _.some<TResult>(list, '');
|
||||
result = _.some<{a: number}, TResult>(list, {a: 42});
|
||||
|
||||
result = _.some<TResult>(dictionary);
|
||||
result = _.some<TResult>(dictionary, dictionaryIterator);
|
||||
result = _.some<TResult>(dictionary, dictionaryIterator, any);
|
||||
result = _.some<TResult>(dictionary, '');
|
||||
result = _.some<{a: number}, TResult>(dictionary, {a: 42});
|
||||
result = _.some<TResult>(dictionary);
|
||||
result = _.some<TResult>(dictionary, dictionaryIterator);
|
||||
result = _.some<TResult>(dictionary, dictionaryIterator, any);
|
||||
result = _.some<TResult>(dictionary, '');
|
||||
result = _.some<{a: number}, TResult>(dictionary, {a: 42});
|
||||
|
||||
result = _(array).some();
|
||||
result = _(array).some(listIterator);
|
||||
result = _(array).some(listIterator, any);
|
||||
result = _(array).some('');
|
||||
result = _(array).some<{a: number}>({a: 42});
|
||||
result = _(array).some();
|
||||
result = _(array).some(listIterator);
|
||||
result = _(array).some(listIterator, any);
|
||||
result = _(array).some('');
|
||||
result = _(array).some<{a: number}>({a: 42});
|
||||
|
||||
result = _(list).some<TResult>();
|
||||
result = _(list).some<TResult>(listIterator);
|
||||
result = _(list).some<TResult>(listIterator, any);
|
||||
result = _(list).some('');
|
||||
result = _(list).some<{a: number}>({a: 42});
|
||||
result = _(list).some<TResult>();
|
||||
result = _(list).some<TResult>(listIterator);
|
||||
result = _(list).some<TResult>(listIterator, any);
|
||||
result = _(list).some('');
|
||||
result = _(list).some<{a: number}>({a: 42});
|
||||
|
||||
result = _(dictionary).some<TResult>();
|
||||
result = _(dictionary).some<TResult>(dictionaryIterator);
|
||||
result = _(dictionary).some<TResult>(dictionaryIterator, any);
|
||||
result = _(dictionary).some('');
|
||||
result = _(dictionary).some<{a: number}>({a: 42});
|
||||
result = _(dictionary).some<TResult>();
|
||||
result = _(dictionary).some<TResult>(dictionaryIterator);
|
||||
result = _(dictionary).some<TResult>(dictionaryIterator, any);
|
||||
result = _(dictionary).some('');
|
||||
result = _(dictionary).some<{a: number}>({a: 42});
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<boolean>;
|
||||
|
||||
result = _(array).chain().some();
|
||||
result = _(array).chain().some(listIterator);
|
||||
result = _(array).chain().some(listIterator, any);
|
||||
result = _(array).chain().some('');
|
||||
result = _(array).chain().some<{a: number}>({a: 42});
|
||||
|
||||
result = _(list).chain().some<TResult>();
|
||||
result = _(list).chain().some<TResult>(listIterator);
|
||||
result = _(list).chain().some<TResult>(listIterator, any);
|
||||
result = _(list).chain().some('');
|
||||
result = _(list).chain().some<{a: number}>({a: 42});
|
||||
|
||||
result = _(dictionary).chain().some<TResult>();
|
||||
result = _(dictionary).chain().some<TResult>(dictionaryIterator);
|
||||
result = _(dictionary).chain().some<TResult>(dictionaryIterator, any);
|
||||
result = _(dictionary).chain().some('');
|
||||
result = _(dictionary).chain().some<{a: number}>({a: 42});
|
||||
}
|
||||
}
|
||||
|
||||
result = <number[]>_.sortBy([1, 2, 3], function (num) { return Math.sin(num); });
|
||||
|
||||
Vendored
+100
@@ -3308,6 +3308,56 @@ declare module _ {
|
||||
): boolean;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
any(
|
||||
predicate?: ListIterator<T, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
any(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
any<TObject extends {}>(
|
||||
predicate?: TObject
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
any<TResult>(
|
||||
predicate?: ListIterator<TResult, boolean>|DictionaryIterator<TResult, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
any(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
any<TObject extends {}>(
|
||||
predicate?: TObject
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
}
|
||||
|
||||
//_.at
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -6028,6 +6078,56 @@ declare module _ {
|
||||
): boolean;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
some(
|
||||
predicate?: ListIterator<T, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
some(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
some<TObject extends {}>(
|
||||
predicate?: TObject
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
some<TResult>(
|
||||
predicate?: ListIterator<TResult, boolean>|DictionaryIterator<TResult, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
some(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
|
||||
/**
|
||||
* @see _.some
|
||||
*/
|
||||
some<TObject extends {}>(
|
||||
predicate?: TObject
|
||||
): LoDashExplicitWrapper<boolean>;
|
||||
}
|
||||
|
||||
//_.sortBy
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user