Skip to content

Commit f8f7290

Browse files
authored
feat: update assert TypeScript declarations
PR-URL: #9237 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 177c77b commit f8f7290

File tree

1 file changed

+161
-0
lines changed
  • lib/node_modules/@stdlib/assert/docs/types

1 file changed

+161
-0
lines changed

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

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ import isAlmostEqualComplex128array = require( '@stdlib/assert/is-almost-equal-c
8585
import isAlmostEqualFloat32array = require( '@stdlib/assert/is-almost-equal-float32array' );
8686
import isAlmostEqualFloat64Array = require( '@stdlib/assert/is-almost-equal-float64array' );
8787
import isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' );
88+
import isAlmostSameValueArray = require( '@stdlib/assert/is-almost-same-value-array' );
89+
import isAlmostSameValueComplex64Array = require( '@stdlib/assert/is-almost-same-value-complex64array' );
90+
import isAlmostSameValueComplex128Array = require( '@stdlib/assert/is-almost-same-value-complex128array' );
91+
import isAlmostSameValueFloat32Array = require( '@stdlib/assert/is-almost-same-value-float32array' );
92+
import isAlmostSameValueFloat64Array = require( '@stdlib/assert/is-almost-same-value-float64array' );
8893
import isAlphagram = require( '@stdlib/assert/is-alphagram' );
8994
import isAlphaNumeric = require( '@stdlib/assert/is-alphanumeric' );
9095
import isAnagram = require( '@stdlib/assert/is-anagram' );
@@ -1553,6 +1558,162 @@ interface Namespace {
15531558
*/
15541559
isAlmostSameValue: typeof isAlmostSameValue;
15551560

1561+
/**
1562+
* 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).
1563+
*
1564+
* ## Notes
1565+
*
1566+
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
1567+
*
1568+
* @param v1 - first input value
1569+
* @param v2 - second input value
1570+
* @param maxULP - maximum allowed ULP difference
1571+
* @returns boolean indicating whether two arguments are approximately the same value
1572+
*
1573+
* @example
1574+
* var x = [ 1.0, 2.0, 3.0 ];
1575+
* var y = [ 1.0, 2.0, 3.0 ];
1576+
*
1577+
* var out = ns.isAlmostSameValueArray( x, y, 0 );
1578+
* // returns true
1579+
*
1580+
* @example
1581+
* var x = [ 1.0, 2.0, 3.0 ];
1582+
* var y = [ 1.0, 2.0, 4.0 ];
1583+
*
1584+
* var out = ns.isAlmostSameValueArray( x, y, 1 );
1585+
* // returns false
1586+
*/
1587+
isAlmostSameValueArray: typeof isAlmostSameValueArray;
1588+
1589+
/**
1590+
* 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).
1591+
*
1592+
* ## Notes
1593+
*
1594+
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
1595+
*
1596+
* @param v1 - first input value
1597+
* @param v2 - second input value
1598+
* @param maxULP - maximum allowed ULP difference
1599+
* @returns boolean indicating whether two arguments are approximately the same value
1600+
*
1601+
* @example
1602+
* var Complex64Array = require( '@stdlib/array/complex64' );
1603+
*
1604+
* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1605+
* var y = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1606+
*
1607+
* var out = ns.isAlmostSameValueComplex64Array( x, y, 0 );
1608+
* // returns true
1609+
*
1610+
* @example
1611+
* var Complex64Array = require( '@stdlib/array/complex64' );
1612+
*
1613+
* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1614+
* var y = new Complex64Array( [ 1.0, 2.0, 4.0, 4.0 ] );
1615+
*
1616+
* var out = ns.isAlmostSameValueComplex64Array( x, y, 1 );
1617+
* // returns false
1618+
*/
1619+
isAlmostSameValueComplex64Array: typeof isAlmostSameValueComplex64Array;
1620+
1621+
/**
1622+
* 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).
1623+
*
1624+
* ## Notes
1625+
*
1626+
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
1627+
*
1628+
* @param v1 - first input value
1629+
* @param v2 - second input value
1630+
* @param maxULP - maximum allowed ULP difference
1631+
* @returns boolean indicating whether two arguments are approximately the same value
1632+
*
1633+
* @example
1634+
* var Complex128Array = require( '@stdlib/array/complex128' );
1635+
*
1636+
* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1637+
* var y = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1638+
*
1639+
* var out = ns.isAlmostSameValueComplex128Array( x, y, 0 );
1640+
* // returns true
1641+
*
1642+
* @example
1643+
* var Complex128Array = require( '@stdlib/array/complex128' );
1644+
*
1645+
* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1646+
* var y = new Complex128Array( [ 1.0, 2.0, 4.0, 4.0 ] );
1647+
*
1648+
* var out = ns.isAlmostSameValueComplex128Array( x, y, 1 );
1649+
* // returns false
1650+
*/
1651+
isAlmostSameValueComplex128Array: typeof isAlmostSameValueComplex128Array;
1652+
1653+
/**
1654+
* 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).
1655+
*
1656+
* ## Notes
1657+
*
1658+
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
1659+
*
1660+
* @param v1 - first input value
1661+
* @param v2 - second input value
1662+
* @param maxULP - maximum allowed ULP difference
1663+
* @returns boolean indicating whether two arguments are approximately the same value
1664+
*
1665+
* @example
1666+
* var Float32Array = require( '@stdlib/array/float32' );
1667+
*
1668+
* var x = new Float32Array( [ 1.0, 2.0, 3.0 ] );
1669+
* var y = new Float32Array( [ 1.0, 2.0, 3.0 ] );
1670+
*
1671+
* var out = ns.isAlmostSameValueFloat32Array( x, y, 0 );
1672+
* // returns true
1673+
*
1674+
* @example
1675+
* var Float32Array = require( '@stdlib/array/float32' );
1676+
*
1677+
* var x = new Float32Array( [ 1.0, 2.0, 3.0 ] );
1678+
* var y = new Float32Array( [ 1.0, 2.0, 4.0 ] );
1679+
*
1680+
* var out = ns.isAlmostSameValueFloat32Array( x, y, 1 );
1681+
* // returns false
1682+
*/
1683+
isAlmostSameValueFloat32Array: typeof isAlmostSameValueFloat32Array;
1684+
1685+
/**
1686+
* 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).
1687+
*
1688+
* ## Notes
1689+
*
1690+
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
1691+
*
1692+
* @param v1 - first input value
1693+
* @param v2 - second input value
1694+
* @param maxULP - maximum allowed ULP difference
1695+
* @returns boolean indicating whether two arguments are approximately the same value
1696+
*
1697+
* @example
1698+
* var Float64Array = require( '@stdlib/array/float64' );
1699+
*
1700+
* var x = new Float64Array( [ 1.0, 2.0, 3.0 ] );
1701+
* var y = new Float64Array( [ 1.0, 2.0, 3.0 ] );
1702+
*
1703+
* var out = ns.isAlmostSameValueFloat64Array( x, y, 0 );
1704+
* // returns true
1705+
*
1706+
* @example
1707+
* var Float64Array = require( '@stdlib/array/float64' );
1708+
*
1709+
* var x = new Float64Array( [ 1.0, 2.0, 3.0 ] );
1710+
* var y = new Float64Array( [ 1.0, 2.0, 4.0 ] );
1711+
*
1712+
* var out = ns.isAlmostSameValueFloat64Array( x, y, 1 );
1713+
* // returns false
1714+
*/
1715+
isAlmostSameValueFloat64Array: typeof isAlmostSameValueFloat64Array;
1716+
15561717
/**
15571718
* Tests if a value is an alphagram (i.e., a sequence of characters arranged in alphabetical order).
15581719
*

0 commit comments

Comments
 (0)