mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
lodash - _.filter(): predicate can be a RegExp (#14961)
This commit is contained in:
committed by
Mohamed Hegazy
parent
5455f4cd35
commit
c928fee373
Vendored
+5
-5
@@ -6707,7 +6707,7 @@ declare namespace _ {
|
||||
*/
|
||||
filter<T>(
|
||||
collection: List<T>|Dictionary<T>,
|
||||
predicate: string
|
||||
predicate: string|RegExp
|
||||
): T[];
|
||||
|
||||
/**
|
||||
@@ -6740,7 +6740,7 @@ declare namespace _ {
|
||||
* @see _.filter
|
||||
*/
|
||||
filter(
|
||||
predicate: string
|
||||
predicate: string|RegExp
|
||||
): LoDashImplicitArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
@@ -6761,7 +6761,7 @@ declare namespace _ {
|
||||
* @see _.filter
|
||||
*/
|
||||
filter<T>(
|
||||
predicate: string
|
||||
predicate: string|RegExp
|
||||
): LoDashImplicitArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
@@ -6791,7 +6791,7 @@ declare namespace _ {
|
||||
* @see _.filter
|
||||
*/
|
||||
filter(
|
||||
predicate: string
|
||||
predicate: string|RegExp
|
||||
): LoDashExplicitArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
@@ -6812,7 +6812,7 @@ declare namespace _ {
|
||||
* @see _.filter
|
||||
*/
|
||||
filter<T>(
|
||||
predicate: string
|
||||
predicate: string|RegExp
|
||||
): LoDashExplicitArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3625,14 +3625,17 @@ namespace TestFilter {
|
||||
|
||||
result = _.filter<TResult>(array, listIterator);
|
||||
result = _.filter<TResult>(array, '');
|
||||
result = _.filter<TResult>(array, /./);
|
||||
result = _.filter<TResult>(array, {a: 42});
|
||||
|
||||
result = _.filter<TResult>(list, listIterator);
|
||||
result = _.filter<TResult>(list, '');
|
||||
result = _.filter<TResult>(list, /./);
|
||||
result = _.filter<TResult>(list, {a: 42});
|
||||
|
||||
result = _.filter<TResult>(dictionary, dictionaryIterator);
|
||||
result = _.filter<TResult>(dictionary, '');
|
||||
result = _.filter<TResult>(dictionary, /./);
|
||||
result = _.filter<TResult>(dictionary, {a: 42});
|
||||
}
|
||||
|
||||
@@ -3647,14 +3650,17 @@ namespace TestFilter {
|
||||
|
||||
result = _(array).filter(listIterator);
|
||||
result = _(array).filter('');
|
||||
result = _(array).filter(/./);
|
||||
result = _(array).filter({a: 42});
|
||||
|
||||
result = _(list).filter<TResult>(listIterator);
|
||||
result = _(list).filter<TResult>('');
|
||||
result = _(list).filter<TResult>(/./);
|
||||
result = _(list).filter<TResult>({a: 42});
|
||||
|
||||
result = _(dictionary).filter<TResult>(dictionaryIterator);
|
||||
result = _(dictionary).filter<TResult>('');
|
||||
result = _(dictionary).filter<TResult>(/./);
|
||||
result = _(dictionary).filter<TResult>({a: 42});
|
||||
}
|
||||
|
||||
@@ -3669,14 +3675,17 @@ namespace TestFilter {
|
||||
|
||||
result = _(array).chain().filter(listIterator);
|
||||
result = _(array).chain().filter('');
|
||||
result = _(array).chain().filter(/./);
|
||||
result = _(array).chain().filter({a: 42});
|
||||
|
||||
result = _(list).chain().filter<TResult>(listIterator);
|
||||
result = _(list).chain().filter<TResult>('');
|
||||
result = _(list).chain().filter<TResult>(/./);
|
||||
result = _(list).chain().filter<TResult>({a: 42});
|
||||
|
||||
result = _(dictionary).chain().filter<TResult>(dictionaryIterator);
|
||||
result = _(dictionary).chain().filter<TResult>('');
|
||||
result = _(dictionary).chain().filter<TResult>(/./);
|
||||
result = _(dictionary).chain().filter<TResult>({a: 42});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user