Skip to content

Commit 6d60a02

Browse files
authored
feat: update assert TypeScript declarations
PR-URL: #12224 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 008cf16 commit 6d60a02

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

  • lib/node_modules/@stdlib/assert/docs/types

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ import isNamedTypedTupleLike = require( '@stdlib/assert/is-named-typed-tuple-lik
221221
import isnan = require( '@stdlib/assert/is-nan' );
222222
import isNaNArray = require( '@stdlib/assert/is-nan-array' );
223223
import isNativeFunction = require( '@stdlib/assert/is-native-function' );
224+
import isndarrayDescriptor = require( '@stdlib/assert/is-ndarray-descriptor' );
224225
import isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
225226
import isndarrayLikeWithDataType = require( '@stdlib/assert/is-ndarray-like-with-data-type' );
226227
import isNegativeFinite = require( '@stdlib/assert/is-negative-finite' );
@@ -4735,6 +4736,34 @@ interface Namespace {
47354736
*/
47364737
isNativeFunction: typeof isNativeFunction;
47374738

4739+
/**
4740+
* Tests if a value is an ndarray descriptor.
4741+
*
4742+
* ## Notes
4743+
*
4744+
* - An ndarray descriptor is an object with the following properties:
4745+
*
4746+
* - dtype: data type.
4747+
* - data: underlying data buffer.
4748+
* - shape: array shape.
4749+
* - strides: array strides.
4750+
* - offset: starting index of the first indexed element in the data buffer.
4751+
* - order: storage layout.
4752+
*
4753+
* @param v - value to test
4754+
* @returns boolean indicating if a value is an ndarray descriptor
4755+
*
4756+
* @example
4757+
* var zeros = require( '@stdlib/ndarray/zeros' );
4758+
*
4759+
* var bool = ns.isndarrayDescriptor( zeros( [ 2, 2 ] ) );
4760+
* // returns true
4761+
*
4762+
* bool = ns.isndarrayDescriptor( [] );
4763+
* // returns false
4764+
*/
4765+
isndarrayDescriptor: typeof isndarrayDescriptor;
4766+
47384767
/**
47394768
* Tests if a value is ndarray-like.
47404769
*

0 commit comments

Comments
 (0)