Skip to content

Commit 6338030

Browse files
authored
feat: update array/base/assert TypeScript declarations
PR-URL: #9196 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent d2379cd commit 6338030

File tree

1 file changed

+22
-0
lines changed
  • lib/node_modules/@stdlib/array/base/assert/docs/types

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import contains = require( '@stdlib/array/base/assert/contains' );
2424
import hasAlmostEqualValues = require( '@stdlib/array/base/assert/has-almost-equal-values' );
25+
import hasAlmostSameValues = require( '@stdlib/array/base/assert/has-almost-same-values' );
2526
import hasEqualValues = require( '@stdlib/array/base/assert/has-equal-values' );
2627
import hasEqualValuesIndexed = require( '@stdlib/array/base/assert/has-equal-values-indexed' );
2728
import hasSameValues = require( '@stdlib/array/base/assert/has-same-values' );
@@ -95,6 +96,27 @@ interface Namespace {
9596
*/
9697
hasAlmostEqualValues: typeof hasAlmostEqualValues;
9798

99+
/**
100+
* Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place).
101+
*
102+
* ## Notes
103+
*
104+
* - If provided arrays of unequal length, the function returns `false`.
105+
*
106+
* @param x - first input array
107+
* @param y - second input array
108+
* @param maxULP - maximum allowed ULP difference
109+
* @returns boolean indicating whether both arrays are approximately the same value
110+
*
111+
* @example
112+
* var x = [ 0, 0, 1, 0 ];
113+
* var y = [ 0, 0, 1, 0 ];
114+
*
115+
* var out = ns.hasAlmostSameValues( x, y, 0 );
116+
* // returns true
117+
*/
118+
hasAlmostSameValues: typeof hasAlmostSameValues;
119+
98120
/**
99121
* Tests if two arrays have equal values.
100122
*

0 commit comments

Comments
 (0)