Skip to content

Commit c46a7d1

Browse files
committed
Auto-generated commit
1 parent 8895f77 commit c46a7d1

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-12-03)
7+
## Unreleased (2025-12-04)
88

99
<section class="features">
1010

@@ -27,12 +27,23 @@
2727

2828
<!-- /.features -->
2929

30+
<section class="bug-fixes">
31+
32+
### Bug Fixes
33+
34+
- [`0371c46`](https://github.com/stdlib-js/stdlib/commit/0371c4601c1767f36cffd00a77b6caf96de9478c) - add missing `thisArg` parameter
35+
36+
</section>
37+
38+
<!-- /.bug-fixes -->
39+
3040
<section class="commits">
3141

3242
### Commits
3343

3444
<details>
3545

46+
- [`0371c46`](https://github.com/stdlib-js/stdlib/commit/0371c4601c1767f36cffd00a77b6caf96de9478c) - **fix:** add missing `thisArg` parameter _(by Philipp Burckhardt)_
3647
- [`95cda4d`](https://github.com/stdlib-js/stdlib/commit/95cda4dab242ed1c82ade34f0016dde344b88c88) - **refactor:** update paths _(by Neeraj Pathak)_
3748
- [`3abebe5`](https://github.com/stdlib-js/stdlib/commit/3abebe5b4765d38f8ba96115e3d54230ec820e50) - **feat:** add `object/some-own-by` _(by Neeraj Pathak)_
3849
- [`d3c2ccc`](https://github.com/stdlib-js/stdlib/commit/d3c2ccca187782867ce02171a4d0da106728a731) - **docs:** resolve typos and documentation inconsistencies _(by Philipp Burckhardt)_

some-own-by/docs/types/index.d.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
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

Comments
 (0)