File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
- Copyright (c) 2016-2021 The Stdlib Authors.
1
+ Copyright (c) 2016-2022 The Stdlib Authors.
Original file line number Diff line number Diff line change 18
18
19
19
// TypeScript Version: 2.0
20
20
21
+ import Complex128Array = require( '@stdlib/array-complex128' ) ;
22
+ import Complex64Array = require( '@stdlib/array-complex64' ) ;
23
+
24
+ /**
25
+ * Returns a `Complex128Array` constructor.
26
+ *
27
+ * @param dtype - data type
28
+ * @returns constructor
29
+ *
30
+ * @example
31
+ * var ctor = ctors( 'complex128' );
32
+ * // returns <Function>
33
+ */
34
+ declare function ctors ( dtype : 'complex128' ) : typeof Complex128Array ;
35
+
36
+ /**
37
+ * Returns a `Complex64Array` constructor.
38
+ *
39
+ * @param dtype - data type
40
+ * @returns constructor
41
+ *
42
+ * @example
43
+ * var ctor = ctors( 'complex64' );
44
+ * // returns <Function>
45
+ */
46
+ declare function ctors ( dtype : 'complex64' ) : typeof Complex64Array ;
47
+
21
48
/**
22
49
* Returns a complex typed array constructor.
23
50
*
Original file line number Diff line number Diff line change 18
18
19
19
import ctors = require( './index' ) ;
20
20
21
+
21
22
// TESTS //
22
23
23
24
// The function returns a function or null..
24
25
{
25
- ctors ( 'complex128' ) ; // $ExpectType Function | null
26
+ ctors ( 'complex128' ) ; // $ExpectType Complex128ArrayConstructor
27
+ ctors ( 'complex64' ) ; // $ExpectType Complex64ArrayConstructor
26
28
ctors ( 'float' ) ; // $ExpectType Function | null
27
29
}
28
30
You can’t perform that action at this time.
0 commit comments