Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a2093b2

Browse files
committed
fix: correct type definition for filter method in global Array interface
1 parent 23a4bec commit a2093b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/types/global-types.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ declare global {
8585
* @param thisArg An object to which the this keyword can refer in the predicate function.
8686
* If thisArg is omitted, undefined is used as the this value.
8787
*/
88-
filter<S extends T>(predicate: BooleanConstructor, thisArg?: any): NonFalsy<NoInfer<S>>[];
88+
filter<S extends T>(predicate: BooleanConstructor, thisArg?: any): NoInfer<NonFalsy<S>>[];
8989
/**
9090
* Determines whether an array includes a certain element, returning true or false as
9191
* appropriate.
@@ -125,7 +125,7 @@ declare global {
125125
* @param thisArg An object to which the this keyword can refer in the predicate function.
126126
* If thisArg is omitted, undefined is used as the this value.
127127
*/
128-
filter<S extends T>(predicate: BooleanConstructor, thisArg?: any): NonFalsy<NoInfer<S>>[];
128+
filter<S extends T>(predicate: BooleanConstructor, thisArg?: any): NoInfer<NonFalsy<S>>[];
129129
/**
130130
* Determines whether an array includes a certain element, returning true or false as
131131
* appropriate.

0 commit comments

Comments
 (0)