Skip to content

Commit ad886cd

Browse files
stdlib-botkgryte
andauthored
Update namespace TypeScript declarations (stdlib-js#840)
Co-authored-by: kgryte <kgryte@users.noreply.github.com>
1 parent cd3ede6 commit ad886cd

5 files changed

Lines changed: 151 additions & 7 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,12 +635,12 @@ interface Namespace {
635635
/**
636636
* Copies values from `x` into `y`.
637637
*
638-
* @param N - number of values to copy
638+
* @param N - number of values
639639
* @param x - input array
640640
* @param strideX - `x` stride length
641-
* @param y - destination array
641+
* @param y - output array
642642
* @param strideY - `y` stride length
643-
* @returns `y`
643+
* @returns output array
644644
*
645645
* @example
646646
* var Float32Array = require( `@stdlib/array/float32` );

lib/node_modules/@stdlib/math/base/ops/docs/types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ interface Namespace {
300300
*
301301
* @example
302302
* var Complex64 = require( `@stdlib/complex/float32` );
303-
* var real = require( `@stdlib/complex/real` );
304-
* var imag = require( `@stdlib/complex/imag` );
303+
* var realf = require( `@stdlib/complex/realf` );
304+
* var imagf = require( `@stdlib/complex/imagf` );
305305
*
306306
* var z1 = new Complex64( 5.0, 3.0 );
307307
* // returns <Complex64>
@@ -312,10 +312,10 @@ interface Namespace {
312312
* var out = ns.csubf( z1, z2 );
313313
* // returns <Complex64>
314314
*
315-
* var re = real( out );
315+
* var re = realf( out );
316316
* // returns 7.0
317317
*
318-
* var im = imag( out );
318+
* var im = imagf( out );
319319
* // returns 2.0
320320
*/
321321
csubf: typeof csubf;

lib/node_modules/@stdlib/math/base/special/docs/types/index.d.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ import digamma = require( '@stdlib/math/base/special/digamma' );
109109
import diracDelta = require( '@stdlib/math/base/special/dirac-delta' );
110110
import eta = require( '@stdlib/math/base/special/dirichlet-eta' );
111111
import ellipe = require( '@stdlib/math/base/special/ellipe' );
112+
import ellipj = require( '@stdlib/math/base/special/ellipj' );
112113
import ellipk = require( '@stdlib/math/base/special/ellipk' );
113114
import erf = require( '@stdlib/math/base/special/erf' );
114115
import erfc = require( '@stdlib/math/base/special/erfc' );
@@ -190,6 +191,7 @@ import minabs = require( '@stdlib/math/base/special/minabs' );
190191
import minabsn = require( '@stdlib/math/base/special/minabsn' );
191192
import minmax = require( '@stdlib/math/base/special/minmax' );
192193
import minmaxabs = require( '@stdlib/math/base/special/minmaxabs' );
194+
import minmaxabsn = require( '@stdlib/math/base/special/minmaxabsn' );
193195
import minmaxn = require( '@stdlib/math/base/special/minmaxn' );
194196
import minn = require( '@stdlib/math/base/special/minn' );
195197
import modf = require( '@stdlib/math/base/special/modf' );
@@ -2506,6 +2508,53 @@ interface Namespace {
25062508
*/
25072509
ellipe: typeof ellipe;
25082510

2511+
/**
2512+
* Computes the Jacobi elliptic functions sn, cn, and dn.
2513+
*
2514+
* ## Notes
2515+
*
2516+
* - The functions are evaluated using the [complete elliptic integral of the first kind](https://en.wikipedia.org/wiki/Elliptic_integral#Complete_elliptic_integral_of_the_first_kind) `K`.
2517+
*
2518+
* - The `x` argument is converted to double-precision floating-point format.
2519+
*
2520+
* - The returned values are exact for `m` values where `|m| < 2**-24`.
2521+
*
2522+
* - The functions return `NaN` for `m >= 1`.
2523+
*
2524+
* - When `m < 1`, the following relations hold
2525+
*
2526+
* ```tex
2527+
* \operatorname{sn}(x+x) = 2\operatorname{sn}(x)\operatorname{cn}(x)
2528+
* \operatorname{cn}(x+x) = 1 - 2\operatorname{sn}(x)^{2}
2529+
* \operatorname{dn}(x+x) = 1 - 2\operatorname{sn}(x)^{2}\operatorname{dn}(x)
2530+
* ```
2531+
*
2532+
* @param m - parameter
2533+
* @param x - argument
2534+
* @returns array containing four elements corresponding to the Jacobi elliptic functions and the Jacobi amplitude `am`.
2535+
*
2536+
* @example
2537+
* var v = ns.ellipj( 0.5, 0 );
2538+
* // returns [ ~0.479, ~0.878, 1 ]
2539+
*
2540+
* @example
2541+
* var v = ns.ellipj( 0.5, -1.0 );
2542+
* // returns [ ~0.497, ~0.868, ~1.117 ]
2543+
*
2544+
* @example
2545+
* var v = ns.ellipj( Infinity, 0.5 );
2546+
* // returns [ NaN, NaN, NaN ]
2547+
*
2548+
* @example
2549+
* var v = ns.ellipj( -Infinity );
2550+
* // returns [ NaN, NaN, NaN ]
2551+
*
2552+
* @example
2553+
* var v = ns.ellipj( NaN );
2554+
* // returns [ NaN, NaN, NaN ]
2555+
*/
2556+
ellipj: typeof ellipj;
2557+
25092558
/**
25102559
* Computes the complete elliptic integral of the first kind.
25112560
*
@@ -4900,6 +4949,28 @@ interface Namespace {
49004949
*/
49014950
minmaxabs: typeof minmaxabs;
49024951

4952+
/**
4953+
* Returns the minimum and maximum absolute values.
4954+
*
4955+
* @param x - first number
4956+
* @param y - second number
4957+
* @param args - numbers
4958+
* @returns minimum and maximum absolute values
4959+
*
4960+
* @example
4961+
* var v = ns.minmaxabsn( 3.14, 4.2 );
4962+
* // returns [ 3.14, 4.2 ]
4963+
*
4964+
* @example
4965+
* var v = ns.minmaxabsn( 3.14, NaN );
4966+
* // returns [ NaN, NaN ]
4967+
*
4968+
* @example
4969+
* var v = ns.minmaxabsn( +0.0, -0.0 );
4970+
* // returns [ 0.0, 0.0 ]
4971+
*/
4972+
minmaxabsn: typeof minmaxabsn;
4973+
49034974
/**
49044975
* Returns the minimum and maximum values.
49054976
*

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

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import reDecimalNumber = require( '@stdlib/regexp/decimal-number' );
2929
import reDirname = require( '@stdlib/regexp/dirname' );
3030
import reDirnamePosix = require( '@stdlib/regexp/dirname-posix' );
3131
import reDirnameWindows = require( '@stdlib/regexp/dirname-windows' );
32+
import reDurationString = require( '@stdlib/regexp/duration-string' );
3233
import reEOL = require( '@stdlib/regexp/eol' );
3334
import reExtendedLengthPath = require( '@stdlib/regexp/extended-length-path' );
3435
import reExtname = require( '@stdlib/regexp/extname' );
@@ -210,6 +211,51 @@ interface Namespace {
210211
*/
211212
reDirnameWindows: typeof reDirnameWindows;
212213

214+
/**
215+
* Returns a regular expression to match a duration string.
216+
*
217+
* ## Notes
218+
*
219+
* - A duration string is a string containing a sequence of time units. A time unit is a nonnegative integer followed by a unit identifier. The following unit identifiers are supported:
220+
*
221+
* - `d`: days
222+
* - `h`: hours
223+
* - `m`: minutes
224+
* - `s`: seconds
225+
* - `ms`: milliseconds
226+
*
227+
* For example, the string `1m3s10ms` is a duration string containing three time units: `1m` (1 minute), `3s` (3 seconds), and `10ms` (10 milliseconds). The string `60m` is a duration string containing a single time unit: `60m` (60 minutes). Time units must be supplied in descending order of magnitude (i.e., days, hours, minutes, seconds, milliseconds).
228+
*
229+
* - Duration strings are case insensitive. For example, the string `1M3S10MS` is equivalent to `1m3s10ms`.
230+
*
231+
* - The regular expression captures the following groups:
232+
*
233+
* 1. The days component.
234+
* 2. The hours component.
235+
* 3. The minutes component.
236+
* 4. The seconds component.
237+
* 5. The milliseconds component.
238+
*
239+
* @returns regular expression
240+
*
241+
* @example
242+
* var RE_DURATION = ns.reDurationString();
243+
* // returns <RegExp>
244+
*
245+
* var bool = RE_DURATION.test( '3d23h' );
246+
* // returns true
247+
*
248+
* bool = RE_DURATION.test( '2H30M' );
249+
* // returns true
250+
*
251+
* bool = RE_DURATION.test( 'abc' );
252+
* // returns false
253+
*
254+
* bool = RE_DURATION.test( 'foo bar' );
255+
* // returns false
256+
*/
257+
reDurationString: typeof reDurationString;
258+
213259
/**
214260
* Returns a regular expression to match a newline character sequence.
215261
*

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import ltrimN = require( '@stdlib/string/left-trim-n' );
3737
import lowercase = require( '@stdlib/string/lowercase' );
3838
import nextGraphemeClusterBreak = require( '@stdlib/string/next-grapheme-cluster-break' );
3939
import numGraphemeClusters = require( '@stdlib/string/num-grapheme-clusters' );
40+
import num2words = require( '@stdlib/string/num2words' );
4041
import pad = require( '@stdlib/string/pad' );
4142
import pascalcase = require( '@stdlib/string/pascalcase' );
4243
import percentEncode = require( '@stdlib/string/percent-encode' );
@@ -406,6 +407,32 @@ interface Namespace {
406407
*/
407408
numGraphemeClusters: typeof numGraphemeClusters;
408409

410+
/**
411+
* Converts a number to a word representation.
412+
*
413+
* @param num - number to convert
414+
* @param options - options
415+
* @param options.lang - language code (default: 'en')
416+
* @returns string representation of a number
417+
*
418+
* @example
419+
* var out = ns.num2words( 12 );
420+
* // returns 'twelve'
421+
*
422+
* @example
423+
* var out = ns.num2words( 21.8 );
424+
* // returns 'twenty-one point eight'
425+
*
426+
* @example
427+
* var out = ns.num2words( 1234 );
428+
* // returns 'one thousand two hundred thirty-four'
429+
*
430+
* @example
431+
* var out = ns.num2words( 100381 );
432+
* // returns 'one hundred thousand three hundred eighty-one'
433+
*/
434+
num2words: typeof num2words;
435+
409436
/**
410437
* Pads a string such that the padded string has a length of `len`.
411438
*

0 commit comments

Comments
 (0)