mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Code review fixes.
This commit is contained in:
4
types/lodash/common/collection.d.ts
vendored
4
types/lodash/common/collection.d.ts
vendored
@@ -257,7 +257,7 @@ declare module "../index" {
|
||||
* @see _.filter
|
||||
*/
|
||||
filter(
|
||||
this: LoDashImplicitWrapper<string | string[] | null | undefined>,
|
||||
this: LoDashImplicitWrapper<string | null | undefined>,
|
||||
predicate?: StringIterator<boolean>
|
||||
): LoDashImplicitWrapper<string[]>;
|
||||
|
||||
@@ -299,7 +299,7 @@ declare module "../index" {
|
||||
* @see _.filter
|
||||
*/
|
||||
filter(
|
||||
this: LoDashExplicitWrapper<string | string[] | null | undefined>,
|
||||
this: LoDashExplicitWrapper<string | null | undefined>,
|
||||
predicate?: StringIterator<boolean>
|
||||
): LoDashExplicitWrapper<string[]>;
|
||||
|
||||
|
||||
@@ -1766,7 +1766,7 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType LoDashExplicitWrapper<number
|
||||
fp.filter("", dictionary); // $ExpectType AbcObject[]
|
||||
fp.filter({ a: 42 }, dictionary); // $ExpectType AbcObject[]
|
||||
fp.filter(["a", 42], dictionary); // $ExpectType AbcObject[]
|
||||
fp.filter(Boolean)(["a", "b"]); // $ExpectType any[]
|
||||
fp.filter((s: string) => s === "a")(["a", "b"]); // $ExpectType string[]
|
||||
|
||||
// Test filtering with type guard
|
||||
const a2: Array<string | number> | null | undefined = anything;
|
||||
|
||||
4
types/lowdb/_lodash.d.ts
vendored
4
types/lowdb/_lodash.d.ts
vendored
@@ -459,7 +459,7 @@ declare module "./index" {
|
||||
predicate?: _.ObjectIterateeCustom<T, boolean>
|
||||
): LoDashExplicitSyncWrapper<boolean>;
|
||||
filter(
|
||||
this: LoDashExplicitSyncWrapper<string | string[] | null | undefined>,
|
||||
this: LoDashExplicitSyncWrapper<string | null | undefined>,
|
||||
predicate?: _.StringIterator<boolean>
|
||||
): LoDashExplicitSyncWrapper<string[]>;
|
||||
filter<T, S extends T>(
|
||||
@@ -2055,7 +2055,7 @@ declare module "./index" {
|
||||
predicate?: _.ObjectIterateeCustom<T, boolean>
|
||||
): LoDashExplicitAsyncWrapper<boolean>;
|
||||
filter(
|
||||
this: LoDashExplicitAsyncWrapper<string | string[] | null | undefined>,
|
||||
this: LoDashExplicitAsyncWrapper<string | null | undefined>,
|
||||
predicate?: _.StringIterator<boolean>
|
||||
): LoDashExplicitAsyncWrapper<string[]>;
|
||||
filter<T, S extends T>(
|
||||
|
||||
Reference in New Issue
Block a user