Skip to content

Commit 5d4d0fa

Browse files
committed
test: address lint errors
--- 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 bfd8659 commit 5d4d0fa

1 file changed

Lines changed: 20 additions & 25 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/base/some-by/docs/types

lib/node_modules/@stdlib/ndarray/base/some-by/docs/types/test.ts

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
/// <reference types="@stdlib/types"/>
20-
2119
import zeros = require( '@stdlib/ndarray/zeros' );
2220
import scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
2321
import someBy = require( './index' );
@@ -39,10 +37,9 @@ function clbk( v: any ): boolean {
3937
{
4038
const x = zeros( [ 2, 2 ] );
4139
const n = scalar2ndarray( 2, { 'dtype': 'generic' } );
42-
const arrays = [ x, n ];
4340

44-
someBy( arrays, clbk ); // $ExpectType boolean
45-
someBy( arrays, clbk, {} ); // $ExpectType boolean
41+
someBy( [ x, n ], clbk ); // $ExpectType boolean
42+
someBy( [ x, n ], clbk, {} ); // $ExpectType boolean
4643
}
4744

4845
// The compiler throws an error if the function is provided a first argument which is not an array-like object containing ndarray-like objects...
@@ -70,34 +67,32 @@ function clbk( v: any ): boolean {
7067
{
7168
const x = zeros( [ 2, 2 ] );
7269
const n = scalar2ndarray( 2, { 'dtype': 'generic' } );
73-
const arrays = [ x, n ];
7470

75-
someBy( arrays, '10' ); // $ExpectError
76-
someBy( arrays, 5 ); // $ExpectError
77-
someBy( arrays, true ); // $ExpectError
78-
someBy( arrays, false ); // $ExpectError
79-
someBy( arrays, null ); // $ExpectError
80-
someBy( arrays, undefined ); // $ExpectError
81-
someBy( arrays, [] ); // $ExpectError
82-
someBy( arrays, {} ); // $ExpectError
71+
someBy( [ x, n ], '10' ); // $ExpectError
72+
someBy( [ x, n ], 5 ); // $ExpectError
73+
someBy( [ x, n ], true ); // $ExpectError
74+
someBy( [ x, n ], false ); // $ExpectError
75+
someBy( [ x, n ], null ); // $ExpectError
76+
someBy( [ x, n ], undefined ); // $ExpectError
77+
someBy( [ x, n ], [] ); // $ExpectError
78+
someBy( [ x, n ], {} ); // $ExpectError
8379

84-
someBy( arrays, '10', {} ); // $ExpectError
85-
someBy( arrays, 5, {} ); // $ExpectError
86-
someBy( arrays, true, {} ); // $ExpectError
87-
someBy( arrays, false, {} ); // $ExpectError
88-
someBy( arrays, null, {} ); // $ExpectError
89-
someBy( arrays, undefined, {} ); // $ExpectError
90-
someBy( arrays, [], {} ); // $ExpectError
91-
someBy( arrays, {}, {} ); // $ExpectError
80+
someBy( [ x, n ], '10', {} ); // $ExpectError
81+
someBy( [ x, n ], 5, {} ); // $ExpectError
82+
someBy( [ x, n ], true, {} ); // $ExpectError
83+
someBy( [ x, n ], false, {} ); // $ExpectError
84+
someBy( [ x, n ], null, {} ); // $ExpectError
85+
someBy( [ x, n ], undefined, {} ); // $ExpectError
86+
someBy( [ x, n ], [], {} ); // $ExpectError
87+
someBy( [ x, n ], {}, {} ); // $ExpectError
9288
}
9389

9490
// The compiler throws an error if the function is provided an unsupported number of arguments...
9591
{
9692
const x = zeros( [ 2, 2 ] );
9793
const n = scalar2ndarray( 2, { 'dtype': 'generic' } );
98-
const arrays = [ x, n ];
9994

10095
someBy(); // $ExpectError
101-
someBy( arrays ); // $ExpectError
102-
someBy( arrays, clbk, {}, {} ); // $ExpectError
96+
someBy( [ x, n ] ); // $ExpectError
97+
someBy( [ x, n ], clbk, {}, {} ); // $ExpectError
10398
}

0 commit comments

Comments
 (0)