From 9fafb82b4888e8e20a37939eb1e612fe7b4f16e0 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Sat, 6 Jun 2026 00:42:14 -0500 Subject: [PATCH] fix: infer input ndarray type in `ndarray/some-by` assign overloads Both `assign` overloads typed the input as `x: ndarray` instead of `x: U`, so the `T`/`U` type parameters could not be inferred and the `predicate` argument degraded to `Predicate`. Type the input as `x: U`, matching the non-assign overloads and the sibling `any-by`/`every-by` packages. --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/ndarray/some-by/docs/types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/ndarray/some-by/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/some-by/docs/types/index.d.ts index e5448e1223c0..f7f7fcc7f873 100644 --- a/lib/node_modules/@stdlib/ndarray/some-by/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/some-by/docs/types/index.d.ts @@ -209,7 +209,7 @@ interface SomeBy { * var out = someBy.assign( x, 3, y, isEven ); * // returns [ true ] */ - assign = InputArray, V extends ndarray = ndarray, ThisArg = unknown>( x: ndarray, n: integerndarray | number, y: V, predicate: Predicate, thisArg?: ThisParameterType> ): V; + assign = InputArray, V extends ndarray = ndarray, ThisArg = unknown>( x: U, n: integerndarray | number, y: V, predicate: Predicate, thisArg?: ThisParameterType> ): V; /** * Tests whether at least `n` elements along one or more ndarray dimensions pass a test implemented by a predicate function. @@ -253,7 +253,7 @@ interface SomeBy { * var out = someBy.assign( x, 3, y, {}, isEven ); * // returns [ true ] */ - assign = InputArray, V extends ndarray = ndarray, ThisArg = unknown>( x: ndarray, n: integerndarray | number, y: V, options: BaseOptions, predicate: Predicate, thisArg?: ThisParameterType> ): V; + assign = InputArray, V extends ndarray = ndarray, ThisArg = unknown>( x: U, n: integerndarray | number, y: V, options: BaseOptions, predicate: Predicate, thisArg?: ThisParameterType> ): V; } /**