Skip to content

Commit b5edd51

Browse files
committed
docs: update parameter types
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent cb54e8e commit b5edd51

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/node_modules/@stdlib/random/tools/binary/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ function Random( prng, idtypes, odtypes, policies, options ) {
368368
* @param {*} [options.dtype] - output ndarray data type
369369
* @param {string} [options.order] - memory layout (either row-major or column-major)
370370
* @param {string} [options.mode] - specifies how to handle indices which exceed ndarray dimensions
371-
* @param {StringArray} [options.submode] - specifies how to handle subscripts which exceed ndarray dimensions on a per dimension basis
371+
* @param {ArrayLikeObject<string>} [options.submode] - specifies how to handle subscripts which exceed ndarray dimensions on a per dimension basis
372372
* @param {boolean} [options.readonly] - boolean indicating whether an ndarray should be read-only
373373
* @throws {TypeError} first argument must be a valid shape
374374
* @throws {TypeError} must provide valid PRNG parameters

lib/node_modules/@stdlib/random/tools/binary/lib/validate.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var isObject = require( '@stdlib/assert/is-plain-object' );
2424
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2525
var contains = require( '@stdlib/array/base/assert/contains' );
2626
var join = require( '@stdlib/array/base/join' );
27+
var resolveStr = require( '@stdlib/ndarray/base/dtype-resolve-str' );
2728
var format = require( '@stdlib/string/format' );
2829

2930

@@ -34,12 +35,12 @@ var format = require( '@stdlib/string/format' );
3435
*
3536
* @private
3637
* @param {Object} opts - destination object
37-
* @param {StringArray} dtypes - list of supported output data types
38+
* @param {Array<string>} dtypes - list of supported output data types
3839
* @param {Options} options - function options
39-
* @param {string} [options.dtype] - array data type
40+
* @param {*} [options.dtype] - array data type
4041
* @param {string} [options.order] - memory layout (either row-major or column-major)
4142
* @param {string} [options.mode] - specifies how to handle indices which exceed array dimensions
42-
* @param {StringArray} [options.submode] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis
43+
* @param {ArrayLikeObject<string>} [options.submode] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis
4344
* @param {boolean} [options.readonly] - boolean indicating whether an array should be read-only
4445
* @returns {(Error|null)} null or an error object
4546
*
@@ -61,7 +62,7 @@ function validate( opts, dtypes, options ) {
6162
}
6263
if ( hasOwnProp( options, 'dtype' ) ) {
6364
opts.dtype = options.dtype;
64-
if ( !contains( dtypes, opts.dtype ) ) {
65+
if ( !contains( dtypes, resolveStr( opts.dtype ) ) ) {
6566
return new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s". Option: `%s`.', 'dtype', join( dtypes, '", "' ), opts.dtype ) );
6667
}
6768
}

0 commit comments

Comments
 (0)