From ef081de7b37b119cd919b23c00544f52792e0b6e Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Mon, 8 Jun 2026 23:16:01 -0500 Subject: [PATCH] refactor: align callback helper type names in `iter/for-each` --- 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/iter/for-each/docs/types/index.d.ts | 8 ++++---- lib/node_modules/@stdlib/iter/for-each/docs/types/test.ts | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/iter/for-each/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/for-each/docs/types/index.d.ts index 3551a0d18b7e..f6638911acac 100644 --- a/lib/node_modules/@stdlib/iter/for-each/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/for-each/docs/types/index.d.ts @@ -30,7 +30,7 @@ type Iterator = Iter | IterableIterator; * * @returns callback result */ -type Nullary = () => any; +type nullaryCallback = () => any; /** * Callback function invoked for each iterated value. @@ -38,7 +38,7 @@ type Nullary = () => any; * @param value - iterated value * @returns callback result */ -type Unary = ( value: any ) => any; +type unaryCallback = ( value: any ) => any; /** * Callback function invoked for each iterated value. @@ -47,7 +47,7 @@ type Unary = ( value: any ) => any; * @param i - iteration index * @returns callback result */ -type Binary = ( value: any, i: number ) => any; +type binaryCallback = ( value: any, i: number ) => any; /** * Callback function invoked for each iterated value. @@ -56,7 +56,7 @@ type Binary = ( value: any, i: number ) => any; * @param i - iteration index * @returns callback result */ -type Callback = Nullary | Unary | Binary; +type Callback = nullaryCallback | unaryCallback | binaryCallback; /** * Returns an iterator which invokes a function for each iterated value before returning the iterated value. diff --git a/lib/node_modules/@stdlib/iter/for-each/docs/types/test.ts b/lib/node_modules/@stdlib/iter/for-each/docs/types/test.ts index 392be6dbfe33..25ff1fdabe9b 100644 --- a/lib/node_modules/@stdlib/iter/for-each/docs/types/test.ts +++ b/lib/node_modules/@stdlib/iter/for-each/docs/types/test.ts @@ -46,9 +46,8 @@ function iterator() { * * @param v - iterated value * @param i - iteration index -* @returns callback result */ -function fcn( v: any, i: number ) { +function fcn( v: any, i: number ): any { if ( v !== v || i !== i ) { throw new Error( 'something went wrong' ); }