@@ -4,7 +4,7 @@ import { ArrIterator } from './iterator'
44
55type Values < T > = Array < T | Iterable < T > | undefined | null >
66
7- type Predicate < T > = ( ( item : T , index : number , array : Arr < T > ) => unknown )
7+ type PredicateFunction < T > = ( ( item : T , index : number , array : Arr < T > ) => unknown )
88
99type Truthy < T > = T extends null | undefined | false | '' | 0
1010 ? never
@@ -253,9 +253,9 @@ export class Arr<T> {
253253 /**
254254 * Determine whether the array contains the given `value`.
255255 */
256- has ( valueOrPredicate : T | Predicate < T > ) : boolean {
256+ has ( valueOrPredicate : T | PredicateFunction < T > ) : boolean {
257257 const results = typeof valueOrPredicate === 'function'
258- ? this . filter ( ( item , index ) => ( valueOrPredicate as Predicate < T > ) ( item , index , this ) )
258+ ? this . filter ( ( item , index ) => ( valueOrPredicate as PredicateFunction < T > ) ( item , index , this ) )
259259 : this . filter ( item => item === valueOrPredicate )
260260
261261 return results . length ( ) > 0
@@ -280,8 +280,8 @@ export class Arr<T> {
280280 /**
281281 * Determine whether the array does not contain the given `value`.
282282 */
283- isMissing ( value : T ) : boolean {
284- return ! this . has ( value )
283+ isMissing ( valueOrPredicate : T | PredicateFunction < T > ) : boolean {
284+ return ! this . has ( valueOrPredicate )
285285 }
286286
287287 /**
0 commit comments