Skip to content

Commit

Permalink
feat: update namespace TypeScript declarations
Browse files Browse the repository at this point in the history
Signed-off-by: stdlib-bot <[email protected]>
  • Loading branch information
kgryte authored and stdlib-bot committed Feb 22, 2024
1 parent 819d2e4 commit 81dd42f
Showing 1 changed file with 11 additions and 38 deletions.
49 changes: 11 additions & 38 deletions lib/node_modules/@stdlib/array/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,6 @@ interface Namespace {
/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - If `dtype` is `'generic'`, the function always returns a zero-filled array.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* The function recognizes the following data types:
*
* - `float64`: double-precision floating-point numbers (IEEE 754)
Expand All @@ -474,6 +468,12 @@ interface Namespace {
* - `uint8c`: 8-bit unsigned integers clamped to `0-255`
* - `generic`: generic JavaScript values
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - If `dtype` is `'generic'`, the function always returns a zero-filled array.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type (default: 'float64')
* @returns empty array
Expand All @@ -489,7 +489,7 @@ interface Namespace {
empty: typeof empty;

/**
* Creates an uninitialized array having the same length and data type as a provided input array.
* Creates an uninitialized array having the same length as a provided input array.
*
* ## Notes
*
Expand Down Expand Up @@ -519,20 +519,11 @@ interface Namespace {
* @example
* var zeros = require( '@stdlib/array/zeros' );
*
* var x = zeros( 2, 'float32' );
* // returns <Float32Array>[ 0.0, 0.0 ]
*
* var arr = ns.emptyLike( x );
* // returns <Float32Array>
*
* @example
* var zeros = require( '@stdlib/array/zeros' );
*
* var x = zeros( 2, 'float64' );
* // returns <Float32Array>[ 0.0, 0.0 ]
*
* var arr = ns.emptyLike( x );
* // returns <Float64Array>
* var arr = ns.emptyLike( x, 'float32' );
* // returns <Float32Array>
*/
emptyLike: typeof emptyLike;

Expand Down Expand Up @@ -1040,7 +1031,7 @@ interface Namespace {
ones: typeof ones;

/**
* Creates an array filled with ones and having the same length and data type as a provided input array.
* Creates an array filled with ones and having the same length as a provided input array.
*
* The function supports the following data types:
*
Expand All @@ -1067,15 +1058,6 @@ interface Namespace {
* var x = zeros( 2, 'float64' );
* // returns <Float64Array>[ 0.0, 0.0 ]
*
* var y = ns.onesLike( x );
* // returns <Float64Array>[ 1.0, 1.0 ]
*
* @example
* var zeros = require( '@stdlib/array/zeros' );
*
* var x = zeros( 2, 'float64' );
* // returns <Float64Array>[ 0.0, 0.0 ]
*
* var y = ns.onesLike( x, 'float32' );
* // returns <Float32Array>[ 1.0, 1.0 ]
*/
Expand Down Expand Up @@ -1892,7 +1874,7 @@ interface Namespace {
zeros: typeof zeros;

/**
* Creates a zero-filled array having the same length and data type as a provided input array.
* Creates a zero-filled array having the same length as a provided input array.
*
* The function supports the following data types:
*
Expand All @@ -1919,15 +1901,6 @@ interface Namespace {
* var x = zeros( 2, 'float64' );
* // returns <Float64Array>[ 0.0, 0.0 ]
*
* var y = ns.zerosLike( x );
* // returns <Float64Array>[ 0.0, 0.0 ]
*
* @example
* var zeros = require( '@stdlib/array/zeros' );
*
* var x = zeros( 2, 'float64' );
* // returns <Float64Array>[ 0.0, 0.0 ]
*
* var y = ns.zerosLike( x, 'float32' );
* // returns <Float32Array>[ 0.0, 0.0 ]
*/
Expand Down

0 comments on commit 81dd42f

Please sign in to comment.