Skip to content

Commit ccaf9fe

Browse files
stdlib-botkgryte
andauthored
feat: update namespace TypeScript declarations
PR-URL: #2490 Co-authored-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Athan Reines <kgryte@gmail.com> Signed-off-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
1 parent 6b0e763 commit ccaf9fe

File tree

2 files changed

+35
-15
lines changed

2 files changed

+35
-15
lines changed

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -596,21 +596,6 @@ interface Namespace {
596596
/**
597597
* Returns a filled typed array view of an `ArrayBuffer` according to a provided callback function.
598598
*
599-
* The function recognizes the following data types:
600-
*
601-
* - `float64`: double-precision floating-point numbers (IEEE 754)
602-
* - `float32`: single-precision floating-point numbers (IEEE 754)
603-
* - `complex128`: double-precision complex floating-point numbers
604-
* - `complex64`: single-precision complex floating-point numbers
605-
* - `int32`: 32-bit two's complement signed integers
606-
* - `uint32`: 32-bit unsigned integers
607-
* - `int16`: 16-bit two's complement signed integers
608-
* - `uint16`: 16-bit unsigned integers
609-
* - `int8`: 8-bit two's complement signed integers
610-
* - `uint8`: 8-bit unsigned integers
611-
* - `uint8c`: 8-bit unsigned integers clamped to `0-255`
612-
* - `generic`: generic JavaScript values
613-
*
614599
* ## Notes
615600
*
616601
* - Creating a generic array from an `ArrayBuffer` is **not** supported.

lib/node_modules/@stdlib/strided/base/docs/types/index.d.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ import nullaryAddonDispatch = require( '@stdlib/strided/base/nullary-addon-dispa
4747
import offsetView = require( '@stdlib/strided/base/offset-view' );
4848
import quaternary = require( '@stdlib/strided/base/quaternary' );
4949
import quinary = require( '@stdlib/strided/base/quinary' );
50+
import reinterpretBoolean = require( '@stdlib/strided/base/reinterpret-boolean' );
5051
import reinterpretComplex = require( '@stdlib/strided/base/reinterpret-complex' );
5152
import reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
5253
import reinterpretComplex128 = require( '@stdlib/strided/base/reinterpret-complex128' );
5354
import smap = require( '@stdlib/strided/base/smap' );
5455
import smap2 = require( '@stdlib/strided/base/smap2' );
5556
import smskmap = require( '@stdlib/strided/base/smskmap' );
5657
import smskmap2 = require( '@stdlib/strided/base/smskmap2' );
58+
import stride2offset = require( '@stdlib/strided/base/stride2offset' );
5759
import ternary = require( '@stdlib/strided/base/ternary' );
5860
import unary = require( '@stdlib/strided/base/unary' );
5961
import unaryAddonDispatch = require( '@stdlib/strided/base/unary-addon-dispatch' );
@@ -1048,6 +1050,26 @@ interface Namespace {
10481050
*/
10491051
quinary: typeof quinary;
10501052

1053+
/**
1054+
* Reinterprets a `BooleanArray` as a `Uint8Array`.
1055+
*
1056+
* @param x - input array
1057+
* @param offset - starting index
1058+
* @returns `Uint8Array` view
1059+
*
1060+
* @example
1061+
* var BooleanArray = require( '@stdlib/array/bool' );
1062+
*
1063+
* var x = new BooleanArray( 10 );
1064+
*
1065+
* var out = ns.reinterpretBoolean( x, 0 );
1066+
* // returns <Uint8Array>
1067+
*
1068+
* var bool = ( out.buffer === x.buffer );
1069+
* // returns true
1070+
*/
1071+
reinterpretBoolean: typeof reinterpretBoolean;
1072+
10511073
/**
10521074
* Reinterprets a `Complex128Array` as a `Float64Array`.
10531075
*
@@ -1269,6 +1291,19 @@ interface Namespace {
12691291
*/
12701292
smskmap2: typeof smskmap2;
12711293

1294+
/**
1295+
* Returns the index offset which specifies the location of the first indexed value in a strided array.
1296+
*
1297+
* @param N - number of indexed elements
1298+
* @param stride - index increment
1299+
* @returns offset
1300+
*
1301+
* @example
1302+
* var offset = ns.stride2offset( 10, -10 );
1303+
* // returns 90
1304+
*/
1305+
stride2offset: typeof stride2offset;
1306+
12721307
/**
12731308
* Applies a ternary callback to strided input array elements and assigns results to elements in a strided output array.
12741309
*

0 commit comments

Comments
 (0)