Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: update namespace TypeScript declarations #3190

Merged
merged 1 commit into from
Nov 20, 2024
Merged
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
61 changes: 61 additions & 0 deletions lib/node_modules/@stdlib/array/base/assert/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
/* eslint-disable max-lines */

import contains = require( '@stdlib/array/base/assert/contains' );
import hasEqualValues = require( '@stdlib/array/base/assert/has-equal-values' );
import hasEqualValuesIndexed = require( '@stdlib/array/base/assert/has-equal-values-indexed' );
import hasSameValues = require( '@stdlib/array/base/assert/has-same-values' );
import isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );
import isBooleanDataType = require( '@stdlib/array/base/assert/is-boolean-data-type' );
import isBooleanArray = require( '@stdlib/array/base/assert/is-booleanarray' );
import isByteOrder = require( '@stdlib/array/base/assert/is-byte-order' );
import isComplexFloatingPointDataType = require( '@stdlib/array/base/assert/is-complex-floating-point-data-type' );
import isComplexTypedArray = require( '@stdlib/array/base/assert/is-complex-typed-array' );
import isComplex64Array = require( '@stdlib/array/base/assert/is-complex64array' );
Expand Down Expand Up @@ -69,6 +72,46 @@ interface Namespace {
*/
contains: typeof contains;

/**
* Tests if two arrays have equal values.
*
* ## Notes
*
* - If provided arrays of unequal length, the function returns `false`.
*
* @param x - first input array
* @param y - second input array
* @returns boolean indicating whether both arrays have equal values
*
* @example
* var x = [ 0, 0, 1, 0 ];
* var y = [ 0, 0, 1, 0 ];
*
* var out = ns.hasEqualValues( x, y );
* // returns true
*/
hasEqualValues: typeof hasEqualValues;

/**
* Tests if two indexed arrays have equal values.
*
* ## Notes
*
* - If provided arrays of unequal length, the function returns `false`.
*
* @param x - first input array
* @param y - second input array
* @returns boolean indicating whether both arrays have equal values
*
* @example
* var x = [ 0, 0, 1, 0 ];
* var y = [ 0, 0, 1, 0 ];
*
* var out = ns.hasEqualValuesIndexed( x, y );
* // returns true
*/
hasEqualValuesIndexed: typeof hasEqualValuesIndexed;

/**
* Tests if two arrays have the same values.
*
Expand Down Expand Up @@ -178,6 +221,24 @@ interface Namespace {
*/
isBooleanArray: typeof isBooleanArray;

/**
* Tests whether an input value is a supported array byte order.
*
* @param v - value to test
* @returns boolean indicating whether an input value is a supported array byte order
*
* @example
* var bool = ns.isByteOrder( 'little-endian' );
* // returns true
*
* bool = ns.isByteOrder( 'big-endian' );
* // returns true
*
* bool = ns.isByteOrder( 'foo' );
* // returns false
*/
isByteOrder: typeof isByteOrder;

/**
* Tests whether an input value is a supported array complex-valued floating-point data type.
*
Expand Down
108 changes: 106 additions & 2 deletions lib/node_modules/@stdlib/array/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import countSameValueZero = require( '@stdlib/array/base/count-same-value-zero'
import countTruthy = require( '@stdlib/array/base/count-truthy' );
import cuany = require( '@stdlib/array/base/cuany' );
import cuevery = require( '@stdlib/array/base/cuevery' );
import cunone = require( '@stdlib/array/base/cunone' );
import dedupe = require( '@stdlib/array/base/dedupe' );
import every = require( '@stdlib/array/base/every' );
import everyBy = require( '@stdlib/array/base/every-by' );
Expand Down Expand Up @@ -139,6 +140,7 @@ import nCartesianProduct = require( '@stdlib/array/base/n-cartesian-product' );
import none = require( '@stdlib/array/base/none' );
import noneBy = require( '@stdlib/array/base/none-by' );
import noneByRight = require( '@stdlib/array/base/none-by-right' );
import nulls = require( '@stdlib/array/base/nulls' );
import oneTo = require( '@stdlib/array/base/one-to' );
import ones = require( '@stdlib/array/base/ones' );
import ones2d = require( '@stdlib/array/base/ones2d' );
Expand All @@ -157,6 +159,7 @@ import quinary3d = require( '@stdlib/array/base/quinary3d' );
import quinary4d = require( '@stdlib/array/base/quinary4d' );
import quinary5d = require( '@stdlib/array/base/quinary5d' );
import reject = require( '@stdlib/array/base/reject' );
import removeAt = require( '@stdlib/array/base/remove-at' );
import resolveGetter = require( '@stdlib/array/base/resolve-getter' );
import resolveSetter = require( '@stdlib/array/base/resolve-setter' );
import reverse = require( '@stdlib/array/base/reverse' );
Expand Down Expand Up @@ -186,6 +189,7 @@ import unarynd = require( '@stdlib/array/base/unarynd' );
import unitspace = require( '@stdlib/array/base/unitspace' );
import where = require( '@stdlib/array/base/where' );
import arrayWith = require( '@stdlib/array/base/with' );
import without = require( '@stdlib/array/base/without' );
import zeroTo = require( '@stdlib/array/base/zero-to' );
import zeros = require( '@stdlib/array/base/zeros' );
import zeros2d = require( '@stdlib/array/base/zeros2d' );
Expand Down Expand Up @@ -1468,6 +1472,27 @@ interface Namespace {
*/
cuevery: typeof cuevery;

/**
* Cumulatively tests whether every element in a provided array is falsy.
*
* @param x - input array
* @returns output array
*
* @example
* var x = [ false, false, false, true, false ];
*
* var result = ns.cunone( x );
* // returns [ true, true, true, false, false ];
*
* @example
* var x = [ false, false, false, true, false ];
* var y = [ false, null, false, null, false, null, false, null, false, null ];
*
* var arr = ns.cunone.assign( x, y, 2, 0 );
* // returns [ true, null, true, null, true, null, false, null, false, null ];
*/
cunone: typeof cunone;

/**
* Removes consecutive duplicated values.
*
Expand Down Expand Up @@ -1621,7 +1646,7 @@ interface Namespace {
/**
* Returns a filled "generic" array.
*
* @param value - fill value
* @param value - fill value,
* @param len - array length
* @returns output array
*
Expand Down Expand Up @@ -3082,6 +3107,18 @@ interface Namespace {
*/
noneByRight: typeof noneByRight;

/**
* Returns a "generic" array filled with nulls.
*
* @param len - array length
* @returns output array
*
* @example
* var out = ns.nulls( 3 );
* // returns [ null, null, null ]
*/
nulls: typeof nulls;

/**
* Generates a linearly spaced numeric array whose elements increment by 1 starting from one.
*
Expand Down Expand Up @@ -3510,6 +3547,28 @@ interface Namespace {
*/
reject: typeof reject;

/**
* Removes an element from an array.
*
* ## Notes
*
* - The function mutates the input array.
*
* @param x - input array
* @param index - element index
* @returns input array
*
* @example
* var x = [ 1, 1, 2, 3, 3 ];
*
* var y = ns.removeAt( x, -2 );
* // returns [ 1, 1, 3, 3 ]
*
* var bool = ( x === y );
* // returns true
*/
removeAt: typeof removeAt;

/**
* Returns an accessor function for retrieving an element from an indexed array-like object.
*
Expand Down Expand Up @@ -4249,11 +4308,56 @@ interface Namespace {
* @example
* var x = [ 1, 2, 3, 4, 5, 6 ];
*
* var out = ns.arrayWith( x, 2, 8 );
* var out = ns.arrayWith( x, 1, 8 );
* // returns [ 1, 8, 3, 4, 5, 6 ]
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = [ 1, 2, 3, 4 ];
*
* var out = new Float64Array( [ 0, 0, 0, 0 ] );
* var arr = ns.arrayWith.assign( x, 0, 5, out, 1, 0 );
* // returns <Float64Array>[ 5, 2, 3, 4 ]
*
* var bool = ( arr === out );
* // returns true
*/
arrayWith: typeof arrayWith;

/**
* Returns a new array containing every element from an input array, except for the element at a specified index.
*
* @param x - input array
* @param index - index of the element to exclude
* @returns output array
*
* @example
* var x = [ 1, 2, 3 ];
*
* var out = ns.without( x, 0 );
* // returns [ 2, 3 ]
*
* @example
* var x = [ 1, 2, 3, 4, 5, 6 ];
*
* var out = ns.without( x, 1 );
* // returns [ 1, 3, 4, 5, 6 ]
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = [ 1, 2, 3, 4 ];
*
* var out = new Float64Array( [ 0, 0, 0 ] );
* var arr = ns.without.assign( x, 0, out, 1, 0 );
* // returns <Float64Array>[ 2, 3, 4 ]
*
* var bool = ( arr === out );
* // returns true
*/
without: typeof without;

/**
* Generates a linearly spaced numeric array whose elements increment by 1 starting from zero.
*
Expand Down
29 changes: 26 additions & 3 deletions lib/node_modules/@stdlib/array/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import base = require( '@stdlib/array/base' );
import BooleanArray = require( '@stdlib/array/bool' );
import ArrayBuffer = require( '@stdlib/array/buffer' );
import byteOrders = require( '@stdlib/array/byte-orders' );
import cartesianPower = require( '@stdlib/array/cartesian-power' );
import cartesianProduct = require( '@stdlib/array/cartesian-product' );
import cartesianSquare = require( '@stdlib/array/cartesian-square' );
Expand All @@ -40,6 +41,9 @@
import emptyLike = require( '@stdlib/array/empty-like' );
import filled = require( '@stdlib/array/filled' );
import filledBy = require( '@stdlib/array/filled-by' );
import fixedEndianFactory = require( '@stdlib/array/fixed-endian-factory' );

Check failure on line 44 in lib/node_modules/@stdlib/array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

'fixedEndianFactory' is defined but never used
import Float32ArrayFE = require( '@stdlib/array/fixed-endian-float32' );

Check failure on line 45 in lib/node_modules/@stdlib/array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

'Float32ArrayFE' is defined but never used
import Float64ArrayFE = require( '@stdlib/array/fixed-endian-float64' );

Check failure on line 46 in lib/node_modules/@stdlib/array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

'Float64ArrayFE' is defined but never used
import Float32Array = require( '@stdlib/array/float32' );
import Float64Array = require( '@stdlib/array/float64' );
import iterator2array = require( '@stdlib/array/from-iterator' );
Expand All @@ -52,6 +56,9 @@
import Int16Array = require( '@stdlib/array/int16' );
import Int32Array = require( '@stdlib/array/int32' );
import linspace = require( '@stdlib/array/linspace' );
import littleEndianFactory = require( '@stdlib/array/little-endian-factory' );

Check failure on line 59 in lib/node_modules/@stdlib/array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

'littleEndianFactory' is defined but never used
import Float32ArrayLE = require( '@stdlib/array/little-endian-float32' );

Check failure on line 60 in lib/node_modules/@stdlib/array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

'Float32ArrayLE' is defined but never used
import Float64ArrayLE = require( '@stdlib/array/little-endian-float64' );

Check failure on line 61 in lib/node_modules/@stdlib/array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

'Float64ArrayLE' is defined but never used
import logspace = require( '@stdlib/array/logspace' );
import minDataType = require( '@stdlib/array/min-dtype' );
import mostlySafeCasts = require( '@stdlib/array/mostly-safe-casts' );
Expand Down Expand Up @@ -193,6 +200,24 @@
*/
ArrayBuffer: typeof ArrayBuffer;

/**
* Returns a list of byte orders.
*
* ## Notes
*
* - The output array contains the following orders:
*
* - little-endian: bytes are ordered from least-to-most significant byte.
* - big-endian: bytes are ordered from most-to-least significant byte.
*
* @returns list of byte orders
*
* @example
* var list = ns.byteOrders();
* // e.g., returns [ 'little-endian', 'big-endian' ]
*/
byteOrders: typeof byteOrders;

/**
* Returns the Cartesian power.
*
Expand Down Expand Up @@ -1152,8 +1177,6 @@
/**
* Returns a type promotion table displaying array data types with the smallest size and closest "kind" to which array data types can be safely cast.
*
* @param dtype1 - array data type
* @param dtype2 - array data type
* @returns promotion rule table
*
* @example
Expand Down Expand Up @@ -1384,7 +1407,7 @@
* Returns an iterator which iterates over each element in an array-like object.
*
* @param src - input value
* @param mapFc - function to invoke for each iterated value
* @param mapFcn - function to invoke for each iterated value
* @param thisArg - execution context
* @returns iterator
*
Expand Down
Loading
Loading