Skip to content

Commit 9ba40f2

Browse files
committed
feat: update number/uint8/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 9bdb8b6 commit 9ba40f2

File tree

1 file changed

+103
-0
lines changed
  • lib/node_modules/@stdlib/number/uint8/base/docs/types

1 file changed

+103
-0
lines changed

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

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,42 @@
2020

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

23+
import add = require( '@stdlib/number/uint8/base/add' );
2324
import fromBinaryStringUint8 = require( '@stdlib/number/uint8/base/from-binary-string' );
25+
import identity = require( '@stdlib/number/uint8/base/identity' );
26+
import mul = require( '@stdlib/number/uint8/base/mul' );
27+
import sub = require( '@stdlib/number/uint8/base/sub' );
2428
import toBinaryStringUint8 = require( '@stdlib/number/uint8/base/to-binary-string' );
2529

2630
/**
2731
* Interface describing the `base` namespace.
2832
*/
2933
interface Namespace {
34+
/**
35+
* Computes the sum of two unsigned 8-bit integers `x` and `y`.
36+
*
37+
* ## Notes
38+
*
39+
* - The function performs C-like addition of two unsigned 8-bit integers, including wraparound semantics.
40+
*
41+
* @param x - first input value
42+
* @param y - second input value
43+
* @returns sum
44+
*
45+
* @example
46+
* var v = ns.add( 1, 5 );
47+
* // returns 6
48+
*
49+
* @example
50+
* var v = ns.add( 2, 5 );
51+
* // returns 7
52+
*
53+
* @example
54+
* var v = ns.add( 0, 5 );
55+
* // returns 5
56+
*/
57+
add: typeof add;
58+
3059
/**
3160
* Creates an unsigned 8-bit integer from a literal bit representation.
3261
*
@@ -56,6 +85,80 @@ interface Namespace {
5685
*/
5786
fromBinaryStringUint8: typeof fromBinaryStringUint8;
5887

88+
/**
89+
* Evaluates the identity function for an unsigned 8-bit integer `x`.
90+
*
91+
* @param x - input value
92+
* @returns input value
93+
*
94+
* @example
95+
* var v = ns.identity( 1 );
96+
* // returns 1
97+
*
98+
* @example
99+
* var v = ns.identity( 2 );
100+
* // returns 2
101+
*
102+
* @example
103+
* var v = ns.identity( 0 );
104+
* // returns 0
105+
*
106+
* @example
107+
* var v = ns.identity( 255 );
108+
* // returns 255
109+
*/
110+
identity: typeof identity;
111+
112+
/**
113+
* Multiplies two unsigned 8-bit integers `x` and `y`.
114+
*
115+
* ## Notes
116+
*
117+
* - The function performs C-like multiplication of two unsigned 8-bit integers, including wraparound semantics.
118+
*
119+
* @param x - first input value
120+
* @param y - second input value
121+
* @returns result
122+
*
123+
* @example
124+
* var v = ns.mul( 5, 1 );
125+
* // returns 5
126+
*
127+
* @example
128+
* var v = ns.mul( 5, 2 );
129+
* // returns 10
130+
*
131+
* @example
132+
* var v = ns.mul( 5, 0 );
133+
* // returns 0
134+
*/
135+
mul: typeof mul;
136+
137+
/**
138+
* Subtracts two unsigned 8-bit integers `x` and `y`.
139+
*
140+
* ## Notes
141+
*
142+
* - The function performs C-like subtraction of two unsigned 8-bit integers, including wraparound semantics.
143+
*
144+
* @param x - first input value
145+
* @param y - second input value
146+
* @returns result
147+
*
148+
* @example
149+
* var v = ns.sub( 5, 1 );
150+
* // returns 4
151+
*
152+
* @example
153+
* var v = ns.sub( 5, 2 );
154+
* // returns 3
155+
*
156+
* @example
157+
* var v = ns.sub( 5, 0 );
158+
* // returns 5
159+
*/
160+
sub: typeof sub;
161+
59162
/**
60163
* Returns a string giving the literal bit representation of an unsigned 8-bit integer.
61164
*

0 commit comments

Comments
 (0)