Skip to content

Commit a37ebf5

Browse files
committed
feat: extend data type kinds to include "generic" variations
1 parent 9762e88 commit a37ebf5

1 file changed

Lines changed: 46 additions & 1 deletion

File tree

lib/node_modules/@stdlib/types/index.d.ts

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,90 @@ declare module '@stdlib/types/array' {
4646
*/
4747
type RealDataType = RealFloatingPointDataType | IntegerDataType; // "real"
4848

49+
/**
50+
* Data type for real-valued typed arrays.
51+
*/
52+
type RealAndGenericDataType = RealDataType | 'generic'; // "real_and_generic"
53+
4954
/**
5055
* Data type for floating-point typed arrays.
5156
*/
5257
type RealFloatingPointDataType = 'float64' | 'float32'; // "real_floating_point"
5358

59+
/**
60+
* Data type for floating-point typed arrays.
61+
*/
62+
type RealFloatingPointAndGenericDataType = RealFloatingPointDataType | 'generic'; // "real_floating_point_and_generic"
63+
5464
/**
5565
* Data type for integer typed arrays.
5666
*/
5767
type IntegerDataType = SignedIntegerDataType | UnsignedIntegerDataType; // "integer"
5868

69+
/**
70+
* Data type for integer typed arrays.
71+
*/
72+
type IntegerAndGenericDataType = IntegerDataType | 'generic'; // "integer_and_generic"
73+
5974
/**
6075
* Data type for signed integer typed arrays.
6176
*/
6277
type SignedIntegerDataType = 'int32' | 'int16' | 'int8'; // "signed_integer"
6378

79+
/**
80+
* Data type for signed integer typed arrays.
81+
*/
82+
type SignedIntegerAndGenericDataType = SignedIntegerDataType | 'generic'; // "signed_integer_and_generic"
83+
6484
/**
6585
* Data type for unsigned integer typed arrays.
6686
*/
6787
type UnsignedIntegerDataType = 'uint32' | 'uint16' | 'uint8' | 'uint8c'; // "unsigned_integer"
6888

89+
/**
90+
* Data type for unsigned integer typed arrays.
91+
*/
92+
type UnsignedIntegerAndGenericDataType = UnsignedIntegerDataType | 'generic'; // "unsigned_integer_and_generic"
93+
6994
/**
7095
* Data type for complex number typed arrays.
7196
*/
7297
type ComplexFloatingPointDataType = 'complex64' | 'complex128'; // "complex_floating_point"
7398

99+
/**
100+
* Data type for complex number typed arrays.
101+
*/
102+
type ComplexFloatingPointAndGenericDataType = ComplexFloatingPointDataType | 'generic'; // "complex_floating_point_and_generic"
103+
74104
/**
75105
* Data type for floating-point real or complex typed arrays.
76106
*/
77107
type FloatingPointDataType = RealFloatingPointDataType | ComplexFloatingPointDataType; // "floating_point"
78108

109+
/**
110+
* Data type for floating-point real or complex typed arrays.
111+
*/
112+
type FloatingPointAndGenericDataType = FloatingPointDataType | 'generic'; // "floating_point_and_generic"
113+
79114
/**
80115
* Data type for real-valued or complex number typed arrays.
81116
*/
82117
type NumericDataType = RealDataType | ComplexFloatingPointDataType; // "numeric"
83118

119+
/**
120+
* Data type for real-valued or complex number typed arrays.
121+
*/
122+
type NumericAndGenericDataType = NumericDataType | 'generic'; // "numeric_and_generic"
123+
124+
/**
125+
* Strict data type "kinds".
126+
*/
127+
type StrictDataTypeKind = 'numeric' | 'real' | 'floating_point' | 'real_floating_point' | 'complex_floating_point' | 'integer' | 'signed_integer' | 'unsigned_integer';
128+
84129
/**
85130
* Data type "kinds".
86131
*/
87-
type DataTypeKind = 'all' | 'numeric' | 'real' | 'floating_point' | 'real_floating_point' | 'complex_floating_point' | 'integer' | 'signed_integer' | 'unsigned_integer';
132+
type DataTypeKind = StrictDataTypeKind | 'all' | 'numeric_and_generic' | 'real_and_generic' | 'floating_point_and_generic' | 'real_floating_point_and_generic' | 'complex_floating_point_and_generic' | 'integer_and_generic' | 'signed_integer_and_generic' | 'unsigned_integer_and_generic';
88133

89134
/**
90135
* An array-like value.

0 commit comments

Comments
 (0)