2222
2323/// <reference types="@stdlib/types"/>
2424
25- import { ArrayLike , TypedArray } from '@stdlib/types/array' ;
25+ import { ArrayLike , TypedArray , RealDataType as DataType } from '@stdlib/types/array' ;
2626import ArrayBuffer = require( '@stdlib/array/buffer' ) ;
2727
28- type DType = 'float64' | 'float32' | 'int32' | 'uint32' | 'int16' | 'uint16' | 'int8' | 'uint8' | 'uint8c' ; // tslint:disable-line:max-line-length
29-
3028/**
3129* Creates a typed array.
3230*
@@ -41,7 +39,7 @@ type DType = 'float64' | 'float32' | 'int32' | 'uint32' | 'int16' | 'uint16' | '
4139* var arr = typedarray( 'float32');
4240* // returns <Float32Array>
4341*/
44- declare function typedarray ( dtype ?: DType ) : TypedArray ;
42+ declare function typedarray ( dtype ?: DataType ) : TypedArray ;
4543
4644/**
4745* Creates a typed array.
@@ -58,7 +56,7 @@ declare function typedarray( dtype?: DType ): TypedArray;
5856* var arr = typedarray( 2, 'float32' );
5957* // returns <Float32Array>[ 0.0, 0.0 ]
6058*/
61- declare function typedarray ( length : number , dtype ?: DType ) : TypedArray ;
59+ declare function typedarray ( length : number , dtype ?: DataType ) : TypedArray ;
6260
6361/**
6462* Creates a typed array.
@@ -85,7 +83,7 @@ declare function typedarray( length: number, dtype?: DType ): TypedArray;
8583* var arr2 = typedarray( arr1, 'uint32' );
8684* // returns <Uint32Array>[ 5, 3 ]
8785*/
88- declare function typedarray ( typedarray : TypedArray , dtype ?: DType ) : TypedArray ; // tslint:disable-line:max-line-length
86+ declare function typedarray ( typedarray : TypedArray , dtype ?: DataType ) : TypedArray ; // tslint:disable-line:max-line-length
8987
9088/**
9189* Creates a typed array.
@@ -102,7 +100,7 @@ declare function typedarray( typedarray: TypedArray, dtype?: DType ): TypedArray
102100* var arr = typedarray( [ 5, -3 ], 'int32' );
103101* // returns <Int32Array>[ 5, -3 ]
104102*/
105- declare function typedarray ( obj : ArrayLike < number > | Iterable < any > , dtype ?: DType ) : TypedArray ; // tslint:disable-line:max-line-length
103+ declare function typedarray ( obj : ArrayLike < number > | Iterable < any > , dtype ?: DataType ) : TypedArray ; // tslint:disable-line:max-line-length
106104
107105/**
108106* Creates a typed array.
@@ -125,7 +123,7 @@ declare function typedarray( obj: ArrayLike<number> | Iterable<any>, dtype?: DTy
125123* var arr = typedarray( buf, 'float32' );
126124* // returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0 ]
127125*/
128- declare function typedarray ( buffer : ArrayBuffer , dtype ?: DType ) : TypedArray ;
126+ declare function typedarray ( buffer : ArrayBuffer , dtype ?: DataType ) : TypedArray ; // tslint:disable-line:max-line-length
129127
130128/**
131129* Creates a typed array.
@@ -149,7 +147,7 @@ declare function typedarray( buffer: ArrayBuffer, dtype?: DType ): TypedArray;
149147* var arr = typedarray( buf, 8, 'float32' );
150148* // returns <Float32Array>[ 0.0, 0.0 ]
151149*/
152- declare function typedarray ( buffer : ArrayBuffer , byteOffset ?: number , dtype ?: DType ) : TypedArray ; // tslint:disable-line:max-line-length
150+ declare function typedarray ( buffer : ArrayBuffer , byteOffset ?: number , dtype ?: DataType ) : TypedArray ; // tslint:disable-line:max-line-length
153151
154152/**
155153* Creates a typed array.
@@ -174,7 +172,7 @@ declare function typedarray( buffer: ArrayBuffer, byteOffset?: number, dtype?: D
174172* var arr = typedarray( buf, 8, 2, 'int32' );
175173* // returns <Int32Array>[ 0, 0 ]
176174*/
177- declare function typedarray ( buffer : ArrayBuffer , byteOffset ?: number , length ?: number , dtype ?: DType ) : TypedArray ; // tslint:disable-line:max-line-length
175+ declare function typedarray ( buffer : ArrayBuffer , byteOffset ?: number , length ?: number , dtype ?: DataType ) : TypedArray ; // tslint:disable-line:max-line-length
178176
179177
180178// EXPORTS //
0 commit comments