Skip to content

Commit e25b23b

Browse files
committed
feat!: rename type definitions for array and ndarray data types
This commit renames type definitions in order to align with defined data type "kinds". This ensures consistent naming conventions such that a data type "kind" has a direct mapping to a data type type definition. BREAKING CHANGE: rename type definitions for array and ndarray data types In order to migrate, users should update their implementations to use the latest naming conventions. The affected type definitions are aliases for individual data type strings, so their should be no behavioral changes.
1 parent f4a22f1 commit e25b23b

File tree

36 files changed

+86
-86
lines changed

36 files changed

+86
-86
lines changed

Diff for: lib/node_modules/@stdlib/array/linspace/docs/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatOrComplexDataType as DataType, ArrayLike, FloatOrComplexTypedArray, Complex64Array, Complex128Array } from '@stdlib/types/array';
23+
import { FloatingPointDataType as DataType, ArrayLike, FloatOrComplexTypedArray, Complex64Array, Complex128Array } from '@stdlib/types/array';
2424
import { ComplexLike, Complex64, Complex128 } from '@stdlib/types/complex';
2525

2626
/**

Diff for: lib/node_modules/@stdlib/array/min-dtype/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { RealDataType, ComplexDataType, DataType } from '@stdlib/types/array';
23+
import { RealDataType, ComplexFloatingPointDataType } from '@stdlib/types/array';
2424
import { ComplexLike } from '@stdlib/types/complex';
2525

2626
/**
@@ -61,7 +61,7 @@ declare function minDataType( value: number ): RealDataType;
6161
* var dt = minDataType( z );
6262
* // returns 'complex64'
6363
*/
64-
declare function minDataType( value: ComplexLike ): ComplexDataType;
64+
declare function minDataType( value: ComplexLike ): ComplexFloatingPointDataType;
6565

6666
/**
6767
* Returns the minimum array data type of the closest "kind" necessary for storing a provided scalar value.

Diff for: lib/node_modules/@stdlib/array/min-dtype/docs/types/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import minDataType = require( './index' );
2929
};
3030

3131
minDataType( 2.13 ); // $ExpectType RealDataType
32-
minDataType( z ); // $ExpectType ComplexDataType
32+
minDataType( z ); // $ExpectType ComplexFloatingPointDataType
3333
minDataType( 'beep' ); // $ExpectType "generic"
3434
}
3535

Diff for: lib/node_modules/@stdlib/array/nans-like/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { Complex128Array, Complex64Array, AnyArray, FloatOrComplexDataType } from '@stdlib/types/array';
23+
import { Complex128Array, Complex64Array, AnyArray, FloatingPointDataType } from '@stdlib/types/array';
2424

2525
/**
2626
* Data type.
2727
*/
28-
type DataType = FloatOrComplexDataType | 'generic';
28+
type DataType = FloatingPointDataType | 'generic';
2929

3030
/**
3131
* Creates an array filled with NaNs and having the same length as a provided input array.

Diff for: lib/node_modules/@stdlib/array/nans/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { Complex128Array, Complex64Array, FloatOrComplexDataType } from '@stdlib/types/array';
23+
import { Complex128Array, Complex64Array, FloatingPointDataType } from '@stdlib/types/array';
2424

2525
/**
2626
* Data type.
2727
*/
28-
type DataType = FloatOrComplexDataType | 'generic';
28+
type DataType = FloatingPointDataType | 'generic';
2929

3030
/**
3131
* Creates an array filled with NaNs and having a specified length.

Diff for: lib/node_modules/@stdlib/array/pool/docs/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { ArrayLike, RealOrComplexTypedArray, RealOrComplexDataType as DataType } from '@stdlib/types/array';
23+
import { ArrayLike, RealOrComplexTypedArray, NumericDataType as DataType } from '@stdlib/types/array';
2424
import ArrayBuffer = require( '@stdlib/array/buffer' );
2525

2626
/**

Diff for: lib/node_modules/@stdlib/array/typed-complex-dtypes/docs/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { ComplexDataType as DataType } from '@stdlib/types/array';
23+
import { ComplexFloatingPointDataType as DataType } from '@stdlib/types/array';
2424

2525
/**
2626
* Returns a list of complex typed array data types.

Diff for: lib/node_modules/@stdlib/array/typed-complex-dtypes/docs/types/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import dtypes = require( './index' );
2323

2424
// The function returns a string array..
2525
{
26-
dtypes(); // $ExpectType ComplexDataType[]
26+
dtypes(); // $ExpectType ComplexFloatingPointDataType[]
2727
}
2828

2929
// The compiler throws an error if the function is provided arguments...

Diff for: lib/node_modules/@stdlib/array/typed-complex/docs/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/// <reference types="@stdlib/types"/>
2424

25-
import { ArrayLike, ComplexTypedArray, ComplexDataType as DataType } from '@stdlib/types/array';
25+
import { ArrayLike, ComplexTypedArray, ComplexFloatingPointDataType as DataType } from '@stdlib/types/array';
2626
import ArrayBuffer = require( '@stdlib/array/buffer' );
2727

2828
/**

Diff for: lib/node_modules/@stdlib/array/typed-dtypes/docs/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { RealOrComplexDataType as DataType } from '@stdlib/types/array';
23+
import { NumericDataType as DataType } from '@stdlib/types/array';
2424

2525
/**
2626
* Returns a list of typed array data types.

Diff for: lib/node_modules/@stdlib/array/typed-dtypes/docs/types/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import dtypes = require( './index' );
2323

2424
// The function returns a string array..
2525
{
26-
dtypes(); // $ExpectType RealOrComplexDataType[]
26+
dtypes(); // $ExpectType NumericDataType[]
2727
}
2828

2929
// The compiler throws an error if the function is provided arguments...

Diff for: lib/node_modules/@stdlib/array/typed-float-dtypes/docs/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatOrComplexDataType as DataType } from '@stdlib/types/array';
23+
import { FloatingPointDataType as DataType } from '@stdlib/types/array';
2424

2525
/**
2626
* Returns a list of typed array floating-point data types.

Diff for: lib/node_modules/@stdlib/array/typed-float-dtypes/docs/types/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import dtypes = require( './index' );
2323

2424
// The function returns a string array..
2525
{
26-
dtypes(); // $ExpectType FloatOrComplexDataType[]
26+
dtypes(); // $ExpectType FloatingPointDataType[]
2727
}
2828

2929
// The compiler throws an error if the function is provided arguments...

Diff for: lib/node_modules/@stdlib/array/typed-real-float-dtypes/docs/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatDataType as DataType } from '@stdlib/types/array';
23+
import { RealFloatingPointDataType as DataType } from '@stdlib/types/array';
2424

2525
/**
2626
* Returns a list of typed array real-valued floating-point data types.

Diff for: lib/node_modules/@stdlib/array/typed-real-float-dtypes/docs/types/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import dtypes = require( './index' );
2323

2424
// The function returns a string array..
2525
{
26-
dtypes(); // $ExpectType FloatDataType[]
26+
dtypes(); // $ExpectType RealFloatingPointDataType[]
2727
}
2828

2929
// The compiler throws an error if the function is provided arguments...

Diff for: lib/node_modules/@stdlib/array/typed/docs/types/index.d.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/// <reference types="@stdlib/types"/>
2424

25-
import { ArrayLike, RealOrComplexTypedArray, RealOrComplexDataType } from '@stdlib/types/array';
25+
import { ArrayLike, RealOrComplexTypedArray, NumericDataType } from '@stdlib/types/array';
2626
import ArrayBuffer = require( '@stdlib/array/buffer' );
2727

2828
/**
@@ -39,7 +39,7 @@ import ArrayBuffer = require( '@stdlib/array/buffer' );
3939
* var arr = typedarray( 'float32');
4040
* // returns <Float32Array>
4141
*/
42-
declare function typedarray( dtype?: RealOrComplexDataType ): RealOrComplexTypedArray;
42+
declare function typedarray( dtype?: NumericDataType ): RealOrComplexTypedArray;
4343

4444
/**
4545
* Creates a typed array.
@@ -56,7 +56,7 @@ declare function typedarray( dtype?: RealOrComplexDataType ): RealOrComplexTyped
5656
* var arr = typedarray( 2, 'float32' );
5757
* // returns <Float32Array>[ 0.0, 0.0 ]
5858
*/
59-
declare function typedarray( length: number, dtype?: RealOrComplexDataType ): RealOrComplexTypedArray;
59+
declare function typedarray( length: number, dtype?: NumericDataType ): RealOrComplexTypedArray;
6060

6161
/**
6262
* Creates a typed array.
@@ -83,7 +83,7 @@ declare function typedarray( length: number, dtype?: RealOrComplexDataType ): Re
8383
* var arr2 = typedarray( arr1, 'uint32' );
8484
* // returns <Uint32Array>[ 5, 3 ]
8585
*/
86-
declare function typedarray( typedarray: RealOrComplexTypedArray, dtype?: RealOrComplexDataType ): RealOrComplexTypedArray;
86+
declare function typedarray( typedarray: RealOrComplexTypedArray, dtype?: NumericDataType ): RealOrComplexTypedArray;
8787

8888
/**
8989
* Creates a typed array.
@@ -100,7 +100,7 @@ declare function typedarray( typedarray: RealOrComplexTypedArray, dtype?: RealOr
100100
* var arr = typedarray( [ 5, -3 ], 'int32' );
101101
* // returns <Int32Array>[ 5, -3 ]
102102
*/
103-
declare function typedarray( obj: ArrayLike<number> | Iterable<any>, dtype?: RealOrComplexDataType ): RealOrComplexTypedArray;
103+
declare function typedarray( obj: ArrayLike<number> | Iterable<any>, dtype?: NumericDataType ): RealOrComplexTypedArray;
104104

105105
/**
106106
* Creates a typed array.
@@ -123,7 +123,7 @@ declare function typedarray( obj: ArrayLike<number> | Iterable<any>, dtype?: Rea
123123
* var arr = typedarray( buf, 'float32' );
124124
* // returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0 ]
125125
*/
126-
declare function typedarray( buffer: ArrayBuffer, dtype?: RealOrComplexDataType ): RealOrComplexTypedArray;
126+
declare function typedarray( buffer: ArrayBuffer, dtype?: NumericDataType ): RealOrComplexTypedArray;
127127

128128
/**
129129
* Creates a typed array.
@@ -147,7 +147,7 @@ declare function typedarray( buffer: ArrayBuffer, dtype?: RealOrComplexDataType
147147
* var arr = typedarray( buf, 8, 'float32' );
148148
* // returns <Float32Array>[ 0.0, 0.0 ]
149149
*/
150-
declare function typedarray( buffer: ArrayBuffer, byteOffset?: number, dtype?: RealOrComplexDataType ): RealOrComplexTypedArray;
150+
declare function typedarray( buffer: ArrayBuffer, byteOffset?: number, dtype?: NumericDataType ): RealOrComplexTypedArray;
151151

152152
/**
153153
* Creates a typed array.
@@ -172,7 +172,7 @@ declare function typedarray( buffer: ArrayBuffer, byteOffset?: number, dtype?: R
172172
* var arr = typedarray( buf, 8, 2, 'int32' );
173173
* // returns <Int32Array>[ 0, 0 ]
174174
*/
175-
declare function typedarray( buffer: ArrayBuffer, byteOffset?: number, length?: number, dtype?: RealOrComplexDataType ): RealOrComplexTypedArray;
175+
declare function typedarray( buffer: ArrayBuffer, byteOffset?: number, length?: number, dtype?: NumericDataType ): RealOrComplexTypedArray;
176176

177177

178178
// EXPORTS //

Diff for: lib/node_modules/@stdlib/complex/dtype/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { Complex64, Complex128, ComplexDataType } from '@stdlib/types/complex';
23+
import { Complex64, Complex128, ComplexFloatingPointDataType } from '@stdlib/types/complex';
2424

2525
/**
2626
* Complex number data type.
2727
*/
28-
type DataType = ComplexDataType;
28+
type DataType = ComplexFloatingPointDataType;
2929

3030
/**
3131
* Returns the data type of a complex number.

Diff for: lib/node_modules/@stdlib/complex/dtypes/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { ComplexDataType } from '@stdlib/types/complex';
23+
import { ComplexFloatingPointDataType } from '@stdlib/types/complex';
2424

2525
/**
2626
* Returns a list of complex number data types.
@@ -31,7 +31,7 @@ import { ComplexDataType } from '@stdlib/types/complex';
3131
* var list = dtypes();
3232
* // e.g., returns [ 'complex64', 'complex128' ]
3333
*/
34-
declare function dtypes(): Array<ComplexDataType>;
34+
declare function dtypes(): Array<ComplexFloatingPointDataType>;
3535

3636

3737
// EXPORTS //

Diff for: lib/node_modules/@stdlib/complex/dtypes/docs/types/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import dtypes = require( './index' );
2323

2424
// The function returns an array of data types...
2525
{
26-
dtypes(); // $ExpectType ComplexDataType[]
26+
dtypes(); // $ExpectType ComplexFloatingPointDataType[]
2727
}
2828

2929
// The compiler throws an error if the function is provided arguments...

Diff for: lib/node_modules/@stdlib/complex/promotion-rules/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { ComplexDataType } from '@stdlib/types/complex';
23+
import { ComplexFloatingPointDataType } from '@stdlib/types/complex';
2424

2525
/**
2626
* Real number data types.
@@ -30,7 +30,7 @@ type RealDataTypes = 'float64' | 'float32' | 'int32' | 'int16' | 'int8' | 'uint3
3030
/**
3131
* Number data types.
3232
*/
33-
type DataType = RealDataTypes | ComplexDataType;
33+
type DataType = RealDataTypes | ComplexFloatingPointDataType;
3434

3535
/**
3636
* Interface describing a promotion table.

Diff for: lib/node_modules/@stdlib/random/array/arcsine/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatDataType, FloatTypedArray } from '@stdlib/types/array';
23+
import { RealFloatingPointDataType, FloatTypedArray } from '@stdlib/types/array';
2424
import * as random from '@stdlib/types/random';
2525

2626
/**
2727
* Supported data types.
2828
*/
29-
type DataType = FloatDataType | 'generic';
29+
type DataType = RealFloatingPointDataType | 'generic';
3030

3131
/**
3232
* Output array.

Diff for: lib/node_modules/@stdlib/random/array/beta/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatDataType, FloatTypedArray } from '@stdlib/types/array';
23+
import { RealFloatingPointDataType, FloatTypedArray } from '@stdlib/types/array';
2424
import * as random from '@stdlib/types/random';
2525

2626
/**
2727
* Supported data types.
2828
*/
29-
type DataType = FloatDataType | 'generic';
29+
type DataType = RealFloatingPointDataType | 'generic';
3030

3131
/**
3232
* Output array.

Diff for: lib/node_modules/@stdlib/random/array/betaprime/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatDataType, FloatTypedArray } from '@stdlib/types/array';
23+
import { RealFloatingPointDataType, FloatTypedArray } from '@stdlib/types/array';
2424
import * as random from '@stdlib/types/random';
2525

2626
/**
2727
* Supported data types.
2828
*/
29-
type DataType = FloatDataType | 'generic';
29+
type DataType = RealFloatingPointDataType | 'generic';
3030

3131
/**
3232
* Output array.

Diff for: lib/node_modules/@stdlib/random/array/cosine/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatDataType, FloatTypedArray } from '@stdlib/types/array';
23+
import { RealFloatingPointDataType, FloatTypedArray } from '@stdlib/types/array';
2424
import * as random from '@stdlib/types/random';
2525

2626
/**
2727
* Supported data types.
2828
*/
29-
type DataType = FloatDataType | 'generic';
29+
type DataType = RealFloatingPointDataType | 'generic';
3030

3131
/**
3232
* Output array.

Diff for: lib/node_modules/@stdlib/random/array/exponential/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatDataType, FloatTypedArray } from '@stdlib/types/array';
23+
import { RealFloatingPointDataType, FloatTypedArray } from '@stdlib/types/array';
2424
import * as random from '@stdlib/types/random';
2525

2626
/**
2727
* Supported data types.
2828
*/
29-
type DataType = FloatDataType | 'generic';
29+
type DataType = RealFloatingPointDataType | 'generic';
3030

3131
/**
3232
* Output array.

Diff for: lib/node_modules/@stdlib/random/array/gamma/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatDataType, FloatTypedArray } from '@stdlib/types/array';
23+
import { RealFloatingPointDataType, FloatTypedArray } from '@stdlib/types/array';
2424
import * as random from '@stdlib/types/random';
2525

2626
/**
2727
* Supported data types.
2828
*/
29-
type DataType = FloatDataType | 'generic';
29+
type DataType = RealFloatingPointDataType | 'generic';
3030

3131
/**
3232
* Output array.

Diff for: lib/node_modules/@stdlib/random/array/geometric/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { FloatDataType, FloatTypedArray } from '@stdlib/types/array';
23+
import { RealFloatingPointDataType, FloatTypedArray } from '@stdlib/types/array';
2424
import * as random from '@stdlib/types/random';
2525

2626
/**
2727
* Supported data types.
2828
*/
29-
type DataType = FloatDataType | 'generic';
29+
type DataType = RealFloatingPointDataType | 'generic';
3030

3131
/**
3232
* Output array.

0 commit comments

Comments
 (0)