2525*
2626* @returns boolean indicating whether an own property in an object passes a test
2727*/
28- type Nullary = ( ) => boolean ;
28+ type Nullary < U > = ( this : U ) => boolean ;
2929
3030/**
3131* Checks whether an own property in an object passes a test.
3232*
3333* @param value - object value
3434* @returns boolean indicating whether an own property in an object passes a test
3535*/
36- type Unary < T > = ( value : T ) => boolean ;
36+ type Unary < T , U > = ( this : U , value : T ) => boolean ;
3737
3838/**
3939* Checks whether an own property in an object passes a test.
@@ -42,7 +42,7 @@ type Unary<T> = ( value: T ) => boolean;
4242* @param key - object key
4343* @returns boolean indicating whether an own property in an object passes a test
4444*/
45- type Binary < T > = ( value : T , key : keyof any ) => boolean ;
45+ type Binary < T , U > = ( this : U , value : T , key : keyof any ) => boolean ;
4646
4747/**
4848* Checks whether an own property in an object passes a test.
@@ -52,7 +52,7 @@ type Binary<T> = ( value: T, key: keyof any ) => boolean;
5252* @param obj - input object
5353* @returns boolean indicating whether an own property in an object passes a test
5454*/
55- type Ternary < T > = ( value : T , key : keyof any , obj : Record < keyof any , any > ) => boolean ;
55+ type Ternary < T , U > = ( this : U , value : T , key : keyof any , obj : Record < keyof any , any > ) => boolean ;
5656
5757/**
5858* Checks whether an own property in an object passes a test.
@@ -62,7 +62,7 @@ type Ternary<T> = ( value: T, key: keyof any, obj: Record<keyof any, any> ) => b
6262* @param obj - input object
6363* @returns boolean indicating whether an own property in an object passes a test
6464*/
65- type Predicate < T > = Nullary | Unary < T > | Binary < T > | Ternary < T > ;
65+ type Predicate < T , U > = Nullary < U > | Unary < T , U > | Binary < T , U > | Ternary < T , U > ;
6666
6767/**
6868* Tests whether an object contains at least `n` own properties which pass a test implemented by a predicate function.
@@ -82,6 +82,7 @@ type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;
8282* @param obj - input object
8383* @param n - number of properties
8484* @param predicate - test function
85+ * @param thisArg - execution context
8586* @returns boolean indicating whether an object contains at least `n` own properties which pass a test
8687*
8788* @example
@@ -94,7 +95,7 @@ type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;
9495* var bool = someOwnBy( obj, 2, isNegative );
9596* // returns true
9697*/
97- declare function someOwnBy < T = unknown > ( obj : Record < keyof any , any > , n : number , predicate : Predicate < T > ) : boolean ;
98+ declare function someOwnBy < T = unknown , U = unknown > ( obj : Record < keyof any , any > , n : number , predicate : Predicate < T , U > , thisArg ?: ThisParameterType < Predicate < T , U > > ) : boolean ;
9899
99100
100101// EXPORTS //
0 commit comments