Skip to content

Commit ee3f5ae

Browse files
committed
test: use function declaration
--- 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 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: na - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 1a721d0 commit ee3f5ae

File tree

1 file changed

+7
-3
lines changed
  • lib/node_modules/@stdlib/stats/array/max-by/docs/types

1 file changed

+7
-3
lines changed

lib/node_modules/@stdlib/stats/array/max-by/docs/types/test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@
1919
import AccessorArray = require( '@stdlib/array/base/accessor' );
2020
import maxBy = require( './index' );
2121

22-
const accessor = (): number => {
22+
/**
23+
* Accessor function.
24+
*
25+
* @returns accessed value
26+
*/
27+
function accessor(): number {
2328
return 5.0;
24-
};
29+
}
2530

2631

2732
// TESTS //
@@ -40,7 +45,6 @@ const accessor = (): number => {
4045
// The compiler throws an error if the function is provided a first argument which is not a numeric array...
4146
{
4247
maxBy( 10, accessor ); // $ExpectError
43-
maxBy( '10', accessor ); // $ExpectError
4448
maxBy( true, accessor ); // $ExpectError
4549
maxBy( false, accessor ); // $ExpectError
4650
maxBy( null, accessor ); // $ExpectError

0 commit comments

Comments
 (0)