Skip to content
Merged
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
46 changes: 46 additions & 0 deletions lib/node_modules/@stdlib/ndarray/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ import dtype = require( '@stdlib/ndarray/base/dtype' );
import dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );
import dtypeDesc = require( '@stdlib/ndarray/base/dtype-desc' );
import dtypeEnum2Str = require( '@stdlib/ndarray/base/dtype-enum2str' );
import dtypeEnums = require( '@stdlib/ndarray/base/dtype-enums' );
import dtypeObjects = require( '@stdlib/ndarray/base/dtype-objects' );
import dtypeResolveEnum = require( '@stdlib/ndarray/base/dtype-resolve-enum' );
import dtypeResolveStr = require( '@stdlib/ndarray/base/dtype-resolve-str' );
import dtypeStr2Enum = require( '@stdlib/ndarray/base/dtype-str2enum' );
import dtypeStrings = require( '@stdlib/ndarray/base/dtype-strings' );
import dtype2c = require( '@stdlib/ndarray/base/dtype2c' );
import dtypes2enums = require( '@stdlib/ndarray/base/dtypes2enums' );
import dtypes2signatures = require( '@stdlib/ndarray/base/dtypes2signatures' );
Expand Down Expand Up @@ -1193,6 +1196,33 @@ interface Namespace {
*/
dtypeEnum2Str: typeof dtypeEnum2Str;

/**
* Returns an object mapping supported data type strings to enumeration constants.
*
* ## Notes
*
* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.
* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.
*
* @returns object mapping supported data type strings to enumeration constants
*
* @example
* var o = ns.dtypeEnums();
* // returns {...}
*/
dtypeEnums: typeof dtypeEnums;

/**
* Returns an object mapping supported data type strings to data type objects.
*
* @returns object mapping supported data type strings to data type objects
*
* @example
* var o = ns.dtypeObjects();
* // returns {...}
*/
dtypeObjects: typeof dtypeObjects;

/**
* Returns the enumeration constant associated with an ndarray data type value.
*
Expand Down Expand Up @@ -1239,6 +1269,22 @@ interface Namespace {
*/
dtypeStr2Enum: typeof dtypeStr2Enum;

/**
* Returns a list of ndarray data type strings.
*
* @param kind - data type kind
* @returns list of ndarray data type strings
*
* @example
* var list = ns.dtypeStrings();
* // returns [...]
*
* @example
* var list = ns.dtypeStrings( 'floating_point' );
* // returns [...]
*/
dtypeStrings: typeof dtypeStrings;

/**
* Returns the C data type associated with a provided data type value.
*
Expand Down