Skip to content

Commit fe9a4ca

Browse files
committed
feat: update number/int32/base TypeScript declarations
--- 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: na - 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 4a62313 commit fe9a4ca

File tree

1 file changed

+57
-0
lines changed
  • lib/node_modules/@stdlib/number/int32/base/docs/types

1 file changed

+57
-0
lines changed

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

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,69 @@
2020

2121
/* eslint-disable max-lines */
2222

23+
import identity = require( '@stdlib/number/int32/base/identity' );
24+
import mul = require( '@stdlib/number/int32/base/mul' );
25+
import muldw = require( '@stdlib/number/int32/base/muldw' );
2326
import int32ToUint32 = require( '@stdlib/number/int32/base/to-uint32' );
2427

2528
/**
2629
* Interface describing the `base` namespace.
2730
*/
2831
interface Namespace {
32+
/**
33+
* Evaluates the identity function for a signed 32-bit integer `x`.
34+
*
35+
* @param x - input value
36+
* @returns input value
37+
*
38+
* @example
39+
* var v = ns.identity( 1 );
40+
* // returns 1
41+
*
42+
* @example
43+
* var v = ns.identity( 2 );
44+
* // returns 2
45+
*
46+
* @example
47+
* var v = ns.identity( 0 );
48+
* // returns 0
49+
*
50+
* @example
51+
* var v = ns.identity( 2147483647 );
52+
* // returns 2147483647
53+
*/
54+
identity: typeof identity;
55+
56+
/**
57+
* Performs C-like multiplication of two signed 32-bit integers.
58+
*
59+
* @param a - signed 32-bit integer
60+
* @param b - signed 32-bit integer
61+
* @returns product
62+
*
63+
* @example
64+
* var v = ns.mul( -10|0, 4|0 );
65+
* // returns -40
66+
*/
67+
mul: typeof mul;
68+
69+
/**
70+
* Performs multiplication of two signed 32-bit integers and returns an array of two signed 32-bit integers which represents the signed 64-bit integer product.
71+
*
72+
* ## Notes
73+
*
74+
* - When computing the product of 32-bit integer values in double-precision floating-point format (the default JavaScript numeric data type), computing the double word product is necessary in order to avoid exceeding the maximum safe double-precision floating-point integer value.
75+
*
76+
* @param a - integer
77+
* @param b - integer
78+
* @returns output array
79+
*
80+
* @example
81+
* var v = ns.muldw( 0xAAAAAAAA, 0x55555555 );
82+
* // returns [ -477218589, 1908874354 ]
83+
*/
84+
muldw: typeof muldw;
85+
2986
/**
3087
* Converts a signed 32-bit integer to an unsigned 32-bit integer.
3188
*

0 commit comments

Comments
 (0)