From 16f6a2ddd40b108beca9dc4b77d5ecdffb0e8e61 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Tue, 2 Jun 2026 11:29:13 -0500 Subject: [PATCH] fix: broaden parameter types in `@stdlib/assert/is-negative-finite` Type the `value` parameter of the call signature, `isPrimitive`, and `isObject` as `any` instead of `number | Number`, matching the sibling finite/number predicates (`is-positive-finite`, `is-nonnegative-finite`, `is-nonpositive-finite`, `is-negative-number`). The narrow type rejected legitimate inputs documented by the package's own examples (e.g. `isNegativeFinite( null )`). Additionally: - Rename the interface `isNegativeFinite` -> `IsNegativeFinite` (PascalCase) to match all sibling declarations, and update the `declare var` annotation. - Correct the top-level summary "Tests if a value is a negative number." -> "Tests if a value is a finite negative number." (copy-paste from `is-negative-number`) and the `isObject` summary to include "finite". --- 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 --- --- .../is-negative-finite/docs/types/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts index b4f98e921719..03856b1982e9 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts @@ -21,7 +21,7 @@ /** * Interface defining `isNegativeFinite` with methods for testing for primitives and objects, respectively. */ -interface isNegativeFinite { +interface IsNegativeFinite { /** * Tests if a value is a finite negative number. * @@ -52,7 +52,7 @@ interface isNegativeFinite { * var bool = isNegativeFinite( -1.0/0.0 ); * // returns false */ - ( value: number | Number ): boolean; + ( value: any ): boolean; /** * Tests if a value is a number primitive having a finite negative value. @@ -68,10 +68,10 @@ interface isNegativeFinite { * var bool = isNegativeFinite.isPrimitive( new Number( -3.0 ) ); * // returns false */ - isPrimitive( value: number | Number ): boolean; + isPrimitive( value: any ): boolean; /** - * Tests if a value is a number object having a negative value. + * Tests if a value is a number object having a finite negative value. * * @param value - value to test * @returns boolean indicating if a value is a number object having a finite negative value @@ -84,11 +84,11 @@ interface isNegativeFinite { * var bool = isNegativeFinite.isObject( new Number( -3.0 ) ); * // returns true */ - isObject( value: number | Number ): boolean; + isObject( value: any ): boolean; } /** -* Tests if a value is a negative number. +* Tests if a value is a finite negative number. * * @param value - value to test * @returns boolean indicating whether value is a finite negative number @@ -129,7 +129,7 @@ interface isNegativeFinite { * var bool = isNegativeFinite.isObject( new Number( -1.0/0.0 ) ); * // returns false */ -declare var isNegativeFinite: isNegativeFinite; +declare var isNegativeFinite: IsNegativeFinite; // EXPORTS //