16
16
* limitations under the License.
17
17
*/
18
18
19
+ /* eslint-disable @typescript-eslint/no-unused-expressions */
20
+
19
21
import Complex64 = require( './index' ) ;
20
22
21
23
@@ -25,32 +27,23 @@ import Complex64 = require( './index' );
25
27
{
26
28
const x = new Complex64 ( 5.0 , 3.0 ) ; // $ExpectType Complex64
27
29
28
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
29
30
x . im ; // $ExpectType number
30
-
31
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
32
31
x . re ; // $ExpectType number
33
-
34
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
35
32
x . BYTES_PER_ELEMENT ; // $ExpectType 4
36
-
37
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
38
33
x . byteLength ; // $ExpectType 8
39
34
}
40
35
41
36
// 64-bit complex number comes with a `toString` method to serialize a complex number as a string...
42
37
{
43
38
const x = new Complex64 ( 5.0 , 3.0 ) ; // $ExpectType Complex64
44
39
45
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
46
40
x . toString ( ) ; // $ExpectType string
47
41
}
48
42
49
43
// 64-bit complex number comes with a `toJSON` method to serialize a complex number as a JSON object....
50
44
{
51
45
const x = new Complex64 ( 5.0 , 3.0 ) ; // $ExpectType Complex64
52
46
53
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
54
47
x . toJSON ( ) ; // $ExpectType any
55
48
}
56
49
@@ -61,9 +54,6 @@ import Complex64 = require( './index' );
61
54
62
55
// The compiler throws an error if the constructor is provided an unsupported number of arguments...
63
56
{
64
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
65
57
new Complex64 ( 5.0 ) ; // $ExpectError
66
-
67
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
68
58
new Complex64 ( 5.0 , 3.0 , 1.0 ) ; // $ExpectError
69
59
}
0 commit comments