File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
lib/node_modules/@stdlib/complex/float32/base/assert/is-almost-equal/docs/types Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,21 @@ import isAlmostEqualf = require( './index' );
56
56
isAlmostEqualf ( z1 , ( x : number ) : number => x , 1 ) ; // $ExpectError
57
57
}
58
58
59
+ // The compiler throws an error if the function is provided a third argument that is not a number...
60
+ {
61
+ const z1 = new Complex64 ( 5.0 , 3.0 ) ;
62
+ const z2 = new Complex64 ( 5.0 , 3.0 ) ;
63
+
64
+ isAlmostEqualf ( z1 , z2 , 'abc' ) ; // $ExpectError
65
+ isAlmostEqualf ( z1 , z2 , true ) ; // $ExpectError
66
+ isAlmostEqualf ( z1 , z2 , false ) ; // $ExpectError
67
+ isAlmostEqualf ( z1 , z2 , null ) ; // $ExpectError
68
+ isAlmostEqualf ( z1 , z2 , void 0 ) ; // $ExpectError
69
+ isAlmostEqualf ( z1 , z2 , [ ] ) ; // $ExpectError
70
+ isAlmostEqualf ( z1 , z2 , { } ) ; // $ExpectError
71
+ isAlmostEqualf ( z1 , z2 , ( x : number ) : number => x ) ; // $ExpectError
72
+ }
73
+
59
74
// The compiler throws an error if the function is provided an unsupported number of arguments...
60
75
{
61
76
const z1 = new Complex64 ( 5.0 , 3.0 ) ;
You can’t perform that action at this time.
0 commit comments