Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ declare function scalar2array( value: number, dtype: 'float32' ): Float32Array;
* var x = scalar2array( true, 'bool' );
* // returns <BooleanArray>
*/
declare function scalar2array( value: any, dtype: 'bool' ): BooleanArray;
declare function scalar2array( value: boolean, dtype: 'bool' ): BooleanArray; // eslint-disable-line @typescript-eslint/unified-signatures

/**
* Returns a single-element array containing a provided scalar value.
Expand Down
12 changes: 4 additions & 8 deletions lib/node_modules/@stdlib/array/next-dtype/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,16 @@ declare function nextDataType( dtype: 'complex64' ): 'complex128';
* @returns next larger data type
*
* @example
* var dt = nextDataType( 'complex64' );
* // returns 'complex128'
* var dt = nextDataType( 'float64' );
* // returns -1
*/
declare function nextDataType( dtype: DataType ): DataType | number;

/**
* Returns the next larger array data type of the same kind.
*
* ## Notes
*
* - If provided an unrecognized data type, the function returns `null`.
*
* @param dtype - array data type
Expand All @@ -280,18 +281,13 @@ declare function nextDataType( dtype: string ): null;
* - If a data type does not have a next larger data type or the next larger type is not supported, the function returns `-1`.
* - If provided an unrecognized data type, the function returns `null`.
*
* @param dtype - array data type
* @returns next larger data type(s) or null
*
* @example
* var table = nextDataType();
* // returns {...}
*
* @example
* var dt = nextDataType( 'float32' );
* // returns 'float64'
*/
declare function nextDataType( dtype?: DataType ): Table;
declare function nextDataType(): Table;


// EXPORTS //
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/array/to-json/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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

import { RealOrComplexTypedArray } from '@stdlib/types/array';
import { BooleanArray, RealOrComplexTypedArray } from '@stdlib/types/array';

/**
* Typed array data type.
Expand Down Expand Up @@ -61,7 +61,7 @@ interface JSONRepresentation {
* var json = typedarray2json( arr );
* // returns { 'type': 'Float64Array', 'data': [ 5.0, 3.0 ] }
*/
declare function typedarray2json( arr: RealOrComplexTypedArray ): JSONRepresentation;
declare function typedarray2json( arr: RealOrComplexTypedArray | BooleanArray ): JSONRepresentation;


// EXPORTS //
Expand Down
1 change: 0 additions & 1 deletion lib/node_modules/@stdlib/array/to-json/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import typedarray2json = require( './index' );
typedarray2json( true ); // $ExpectError
typedarray2json( false ); // $ExpectError
typedarray2json( {} ); // $ExpectError
typedarray2json( [] ); // $ExpectError
typedarray2json( null ); // $ExpectError
typedarray2json( undefined ); // $ExpectError
}
Expand Down