From bb4a05609d76f17b38995a9d03b52a1a4e1ed022 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Fri, 19 Dec 2025 02:42:53 +0000 Subject: [PATCH] feat: update `assert` TypeScript declarations Signed-off-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> --- .../@stdlib/assert/docs/types/index.d.ts | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) diff --git a/lib/node_modules/@stdlib/assert/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/docs/types/index.d.ts index ed2ad9ae0a56..d2da244a75c3 100644 --- a/lib/node_modules/@stdlib/assert/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/assert/docs/types/index.d.ts @@ -85,6 +85,11 @@ import isAlmostEqualComplex128array = require( '@stdlib/assert/is-almost-equal-c import isAlmostEqualFloat32array = require( '@stdlib/assert/is-almost-equal-float32array' ); import isAlmostEqualFloat64Array = require( '@stdlib/assert/is-almost-equal-float64array' ); import isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); +import isAlmostSameValueArray = require( '@stdlib/assert/is-almost-same-value-array' ); +import isAlmostSameValueComplex64Array = require( '@stdlib/assert/is-almost-same-value-complex64array' ); +import isAlmostSameValueComplex128Array = require( '@stdlib/assert/is-almost-same-value-complex128array' ); +import isAlmostSameValueFloat32Array = require( '@stdlib/assert/is-almost-same-value-float32array' ); +import isAlmostSameValueFloat64Array = require( '@stdlib/assert/is-almost-same-value-float64array' ); import isAlphagram = require( '@stdlib/assert/is-alphagram' ); import isAlphaNumeric = require( '@stdlib/assert/is-alphanumeric' ); import isAnagram = require( '@stdlib/assert/is-anagram' ); @@ -1553,6 +1558,162 @@ interface Namespace { */ isAlmostSameValue: typeof isAlmostSameValue; + /** + * Tests if two arguments are both generic arrays and contain respective elements which are approximately the same value within a specified number of ULPs (units in the last place). + * + * ## Notes + * + * - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same. + * + * @param v1 - first input value + * @param v2 - second input value + * @param maxULP - maximum allowed ULP difference + * @returns boolean indicating whether two arguments are approximately the same value + * + * @example + * var x = [ 1.0, 2.0, 3.0 ]; + * var y = [ 1.0, 2.0, 3.0 ]; + * + * var out = ns.isAlmostSameValueArray( x, y, 0 ); + * // returns true + * + * @example + * var x = [ 1.0, 2.0, 3.0 ]; + * var y = [ 1.0, 2.0, 4.0 ]; + * + * var out = ns.isAlmostSameValueArray( x, y, 1 ); + * // returns false + */ + isAlmostSameValueArray: typeof isAlmostSameValueArray; + + /** + * Tests if two arguments are both Complex64Arrays and contain respective elements which are approximately the same value within a specified number of ULPs (units in the last place). + * + * ## Notes + * + * - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same. + * + * @param v1 - first input value + * @param v2 - second input value + * @param maxULP - maximum allowed ULP difference + * @returns boolean indicating whether two arguments are approximately the same value + * + * @example + * var Complex64Array = require( '@stdlib/array/complex64' ); + * + * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + * var y = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + * + * var out = ns.isAlmostSameValueComplex64Array( x, y, 0 ); + * // returns true + * + * @example + * var Complex64Array = require( '@stdlib/array/complex64' ); + * + * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + * var y = new Complex64Array( [ 1.0, 2.0, 4.0, 4.0 ] ); + * + * var out = ns.isAlmostSameValueComplex64Array( x, y, 1 ); + * // returns false + */ + isAlmostSameValueComplex64Array: typeof isAlmostSameValueComplex64Array; + + /** + * Tests if two arguments are both Complex128Arrays and contain respective elements which are approximately the same value within a specified number of ULPs (units in the last place). + * + * ## Notes + * + * - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same. + * + * @param v1 - first input value + * @param v2 - second input value + * @param maxULP - maximum allowed ULP difference + * @returns boolean indicating whether two arguments are approximately the same value + * + * @example + * var Complex128Array = require( '@stdlib/array/complex128' ); + * + * var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + * var y = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + * + * var out = ns.isAlmostSameValueComplex128Array( x, y, 0 ); + * // returns true + * + * @example + * var Complex128Array = require( '@stdlib/array/complex128' ); + * + * var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + * var y = new Complex128Array( [ 1.0, 2.0, 4.0, 4.0 ] ); + * + * var out = ns.isAlmostSameValueComplex128Array( x, y, 1 ); + * // returns false + */ + isAlmostSameValueComplex128Array: typeof isAlmostSameValueComplex128Array; + + /** + * Tests if two arguments are both Float32Arrays and contain respective elements which are approximately the same value within a specified number of ULPs (units in the last place). + * + * ## Notes + * + * - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same. + * + * @param v1 - first input value + * @param v2 - second input value + * @param maxULP - maximum allowed ULP difference + * @returns boolean indicating whether two arguments are approximately the same value + * + * @example + * var Float32Array = require( '@stdlib/array/float32' ); + * + * var x = new Float32Array( [ 1.0, 2.0, 3.0 ] ); + * var y = new Float32Array( [ 1.0, 2.0, 3.0 ] ); + * + * var out = ns.isAlmostSameValueFloat32Array( x, y, 0 ); + * // returns true + * + * @example + * var Float32Array = require( '@stdlib/array/float32' ); + * + * var x = new Float32Array( [ 1.0, 2.0, 3.0 ] ); + * var y = new Float32Array( [ 1.0, 2.0, 4.0 ] ); + * + * var out = ns.isAlmostSameValueFloat32Array( x, y, 1 ); + * // returns false + */ + isAlmostSameValueFloat32Array: typeof isAlmostSameValueFloat32Array; + + /** + * Tests if two arguments are both Float64Arrays and contain respective elements which are approximately the same value within a specified number of ULPs (units in the last place). + * + * ## Notes + * + * - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same. + * + * @param v1 - first input value + * @param v2 - second input value + * @param maxULP - maximum allowed ULP difference + * @returns boolean indicating whether two arguments are approximately the same value + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] ); + * var y = new Float64Array( [ 1.0, 2.0, 3.0 ] ); + * + * var out = ns.isAlmostSameValueFloat64Array( x, y, 0 ); + * // returns true + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] ); + * var y = new Float64Array( [ 1.0, 2.0, 4.0 ] ); + * + * var out = ns.isAlmostSameValueFloat64Array( x, y, 1 ); + * // returns false + */ + isAlmostSameValueFloat64Array: typeof isAlmostSameValueFloat64Array; + /** * Tests if a value is an alphagram (i.e., a sequence of characters arranged in alphabetical order). *