Skip to content

Commit 5378190

Browse files
committed
Add missing throws annotations
1 parent 3ffc53b commit 5378190

File tree

7 files changed

+12
-0
lines changed

7 files changed

+12
-0
lines changed

lib/node_modules/@stdlib/datasets/lib/datasets.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ var data = require( './data.js' );
3131
*
3232
* @param {string} name - dataset name
3333
* @param {Options} [options] - dataset options
34+
* @throws {RangeError} unsupported/unrecognized dataset name
3435
* @returns {*} dataset
3536
*/
3637
function datasets( name ) {

lib/node_modules/@stdlib/datasets/sotu/lib/sotu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var getFile = require( './get_file.js' );
4343
* @param {(PositiveInteger|PositiveIntegerArray)} [options.year] - year(s)
4444
* @param {PositiveIntegerArray} [options.range] - year range
4545
* @param {(string|StringArray)} [options.party] - political party
46+
* @throws {RangeError} unrecognized property value
4647
* @returns {ObjectArray} SOTU addresses
4748
*
4849
* @example

lib/node_modules/@stdlib/ml/online-binary-classification/lib/weight_vector.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ function innerProduct( x ) {
126126
* @constructor
127127
* @param {PositiveInteger} dim - number of feature weights (excluding bias/intercept term)
128128
* @param {boolean} intercept - boolean indicating whether a bias/intercept weight should be implicitly assumed
129+
* @throws {TypeError} first argument must be a positive integer
130+
* @throws {TypeError} second argument must be a boolean primitive
129131
*/
130132
function WeightVector( dim, intercept ) {
131133
var i;

lib/node_modules/@stdlib/ml/online-sgd-regression/lib/weight_vector.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ function innerProduct( x ) {
126126
* @constructor
127127
* @param {PositiveInteger} dim - number of feature weights (excluding bias/intercept term)
128128
* @param {boolean} intercept - boolean indicating whether a bias/intercept weight should be implicitly assumed
129+
* @throws {TypeError} first argument must be a positive integer
130+
* @throws {TypeError} second argument must be a boolean primitive
129131
*/
130132
function WeightVector( dim, intercept ) {
131133
var i;

lib/node_modules/@stdlib/stats/chi2gof/lib/get_pmf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ var PMF = require( './pmf.js' );
3030
*
3131
* @private
3232
* @param {string} name - distribution name
33+
* @throws {Error} unsupported/unrecognized distribution name
3334
* @returns {Function} PMF
3435
*/
3536
function getPMF( name ) {

lib/node_modules/@stdlib/stats/lowess/lib/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ function ascending( a, b ) {
5959
* @param {integer} [options.nsteps=3] - number of iterations in the robust fit (fewer iterations translates to faster function execution)
6060
* @param {NonNegativeNumber} [options.delta] - nonnegative parameter which may be used to reduce the number of computations
6161
* @param {boolean} [options.sorted=false] - boolean indicating if the input array `x` is already in sorted order
62+
* @throws {TypeError} first argument must be a numeric array
63+
* @throws {TypeError} second argument must be a numeric array
64+
* @throws {Error} arguments `x` and `y` must have the same length
6265
* @returns {Object} ordered x-values and fitted values
6366
*/
6467
function main( x, y, options ) {

lib/node_modules/@stdlib/stats/pcorrtest/lib/print.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ var roundn = require( '@stdlib/math/base/special/roundn' );
3535
* @param {Object} [opts] - options object
3636
* @param {PositiveInteger} [opts.numdigits=4] - number of digits after the decimal point
3737
* @param {boolean} [opts.decision=true] - boolean indicating whether to print the test decision
38+
* @throws {TypeError} options argument must be an object
39+
* @throws {TypeError} must provide valid options
3840
* @returns {string} formatted output
3941
*/
4042
function print( opts ) { // eslint-disable-line stdlib/no-redeclare

0 commit comments

Comments
 (0)