File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
lib/node_modules/@stdlib/stats/array/max-by/docs/types Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 19
19
import AccessorArray = require( '@stdlib/array/base/accessor' ) ;
20
20
import maxBy = require( './index' ) ;
21
21
22
- const accessor = ( ) : number => {
22
+ /**
23
+ * Accessor function.
24
+ *
25
+ * @returns accessed value
26
+ */
27
+ function accessor ( ) : number {
23
28
return 5.0 ;
24
- } ;
29
+ }
25
30
26
31
27
32
// TESTS //
@@ -40,7 +45,6 @@ const accessor = (): number => {
40
45
// The compiler throws an error if the function is provided a first argument which is not a numeric array...
41
46
{
42
47
maxBy ( 10 , accessor ) ; // $ExpectError
43
- maxBy ( '10' , accessor ) ; // $ExpectError
44
48
maxBy ( true , accessor ) ; // $ExpectError
45
49
maxBy ( false , accessor ) ; // $ExpectError
46
50
maxBy ( null , accessor ) ; // $ExpectError
You can’t perform that action at this time.
0 commit comments