Skip to content

Commit 2c927e4

Browse files
committed
docs: fix example code in TS declaration files
--- 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 52ff2d9 commit 2c927e4

12 files changed

Lines changed: 63 additions & 47 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ interface Namespace {
690690
* @returns output array
691691
*
692692
* @example
693-
* var x = ns.scalar2array( 1.0, generic' );
693+
* var x = ns.scalar2array( 1.0, 'generic' );
694694
* // returns [ 1.0 ]
695695
*/
696696
scalar2array: typeof scalar2array;

lib/node_modules/@stdlib/array/from-scalar/docs/types/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ declare function scalar2array( value: number, dtype: 'int16' ): Int16Array;
138138
* @returns output array
139139
*
140140
* @example
141-
* var x = scalar2array( 1, int8' }
141+
* var x = scalar2array( 1, 'int8' }
142142
* // returns <Int8Array>[ 1 ]
143143
*/
144144
declare function scalar2array( value: number, dtype: 'int8' ): Int8Array;
@@ -151,7 +151,7 @@ declare function scalar2array( value: number, dtype: 'int8' ): Int8Array;
151151
* @returns output array
152152
*
153153
* @example
154-
* var x = scalar2array( 1, uint32' );
154+
* var x = scalar2array( 1, 'uint32' );
155155
* // returns <Uint32Array>[ 1 ]
156156
*/
157157
declare function scalar2array( value: number, dtype: 'uint32' ): Uint32Array;
@@ -164,7 +164,7 @@ declare function scalar2array( value: number, dtype: 'uint32' ): Uint32Array;
164164
* @returns output array
165165
*
166166
* @example
167-
* var x = scalar2array( 1, uint16' );
167+
* var x = scalar2array( 1, 'uint16' );
168168
* // returns <Uint16Array>[ 1 ]
169169
*/
170170
declare function scalar2array( value: number, dtype: 'uint16' ): Uint16Array;
@@ -203,7 +203,7 @@ declare function scalar2array( value: number, dtype: 'uint8c' ): Uint8ClampedArr
203203
* @returns output array
204204
*
205205
* @example
206-
* var x = scalar2array( 1.0, generic' );
206+
* var x = scalar2array( 1.0, 'generic' );
207207
* // returns [ 1.0 ]
208208
*/
209209
declare function scalar2array<T = unknown>( value: T, dtype: 'generic' ): Array<T>;
@@ -282,7 +282,7 @@ declare function scalar2array( value: Complex128 | ComplexLike ): Complex128Arra
282282
* @returns output array
283283
*
284284
* @example
285-
* var x = scalar2array( 1.0, generic' );
285+
* var x = scalar2array( 1.0, 'generic' );
286286
* // returns [ 1.0 ]
287287
*/
288288
declare function scalar2array<T = unknown>( value: T, dtype?: DataType ): Array<T>;

lib/node_modules/@stdlib/constants/float32/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ interface Namespace {
347347
* Size (in bytes) of a single-precision floating-point number.
348348
*
349349
* @example
350-
* var bytes = ns.NUM_BYTES
350+
* var bytes = ns.NUM_BYTES;
351351
* // returns 4
352352
*/
353353
NUM_BYTES: typeof NUM_BYTES;

lib/node_modules/@stdlib/constants/float32/num-bytes/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Size (in bytes) of a single-precision floating-point number.
2323
*
2424
* @example
25-
* var bytes = FLOAT32_NUM_BYTES
25+
* var bytes = FLOAT32_NUM_BYTES;
2626
* // returns 4
2727
*/
2828
declare const FLOAT32_NUM_BYTES: number;

lib/node_modules/@stdlib/constants/uint16/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ interface Namespace {
4040
* Size (in bytes) of a 16-bit unsigned integer.
4141
*
4242
* @example
43-
* var bytes = ns.NUM_BYTES
43+
* var bytes = ns.NUM_BYTES;
4444
* // returns 2
4545
*/
4646
NUM_BYTES: typeof NUM_BYTES;

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

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4268,22 +4268,27 @@ interface Namespace {
42684268
* @returns function value
42694269
*
42704270
* @example
4271-
* var y = ns.gammainc( 6.0, 2.0 )
4271+
* var y = ns.gammainc( 6.0, 2.0 );
42724272
* // returns ~0.9826
4273+
*
42734274
* @example
4274-
* var y = ns.gammainc( 1.0, 2.0, true, true )
4275+
* var y = ns.gammainc( 1.0, 2.0, true, true );
42754276
* // returns ~0.7358
4277+
*
42764278
* @example
4277-
* var y = ns.gammainc( 7.0, 5.0 )
4279+
* var y = ns.gammainc( 7.0, 5.0 );
42784280
* // returns ~0.8270
4281+
*
42794282
* @example
4280-
* var y = ns.gammainc( 7.0, 5.0, false )
4283+
* var y = ns.gammainc( 7.0, 5.0, false );
42814284
* // returns ~19.8482
4285+
*
42824286
* @example
4283-
* var y = ns.gammainc( NaN, 2.0 )
4287+
* var y = ns.gammainc( NaN, 2.0 );
42844288
* // returns NaN
4289+
*
42854290
* @example
4286-
* var y = ns.gammainc( 6.0, NaN )
4291+
* var y = ns.gammainc( 6.0, NaN );
42874292
* // returns NaN
42884293
*/
42894294
gammainc: typeof gammainc;
@@ -4718,16 +4723,19 @@ interface Namespace {
47184723
* @returns two-element array holding function value `y` and `1-y`
47194724
*
47204725
* @example
4721-
* var y = ns.kernelBetaincinv( 3.0, 3.0, 0.2, 0.8 )
4726+
* var y = ns.kernelBetaincinv( 3.0, 3.0, 0.2, 0.8 );
47224727
* // returns[ ~0.327, ~0.673 ]
4728+
*
47234729
* @example
4724-
* y = ns.kernelBetaincinv( 3.0, 3.0, 0.4, 0.6 )
4730+
* y = ns.kernelBetaincinv( 3.0, 3.0, 0.4, 0.6 );
47254731
* // returns[ ~0.446, ~0.554 ]
4732+
*
47264733
* @example
4727-
* y = ns.kernelBetaincinv( 1.0, 6.0, 0.4, 0.6 )
4734+
* y = ns.kernelBetaincinv( 1.0, 6.0, 0.4, 0.6 );
47284735
* // returns[ ~0.082, ~0.918 ]
4736+
*
47294737
* @example
4730-
* y = ns.kernelBetaincinv( 1.0, 6.0, 0.8, 0.2 )
4738+
* y = ns.kernelBetaincinv( 1.0, 6.0, 0.8, 0.2 );
47314739
* // returns[ ~0.235, ~0.765 ]
47324740
*/
47334741
kernelBetaincinv: typeof kernelBetaincinv;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,23 @@
3535
* @example
3636
* var y = gammaincinv( 0.5, 2.0 );
3737
* // returns ~1.678
38+
*
3839
* @example
3940
* var y = gammaincinv( 0.1, 10.0 );
4041
* // returns ~6.221
42+
*
4143
* @example
4244
* var y = gammaincinv( 0.75, 3.0 );
4345
* // returns ~3.92
46+
*
4447
* @example
4548
* var y = gammaincinv( 0.75, 3.0, true );
4649
* // returns ~1.727
50+
*
4751
* @example
4852
* var y = gammaincinv( 0.75, NaN );
4953
* // returns NaN
54+
*
5055
* @example
5156
* var y = gammaincinv( NaN, 3.0 );
5257
* // returns NaN

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,19 @@
3232
* @returns two-element array holding function value `y` and `1-y`
3333
*
3434
* @example
35-
* var y = kernelBetaincinv( 3.0, 3.0, 0.2, 0.8 )
35+
* var y = kernelBetaincinv( 3.0, 3.0, 0.2, 0.8 );
3636
* // returns [ ~0.327, ~0.673 ]
37+
*
3738
* @example
38-
* y = kernelBetaincinv( 3.0, 3.0, 0.4, 0.6 )
39+
* var y = kernelBetaincinv( 3.0, 3.0, 0.4, 0.6 );
3940
* // returns [ ~0.446, ~0.554 ]
41+
*
4042
* @example
41-
* y = kernelBetaincinv( 1.0, 6.0, 0.4, 0.6 )
43+
* var y = kernelBetaincinv( 1.0, 6.0, 0.4, 0.6 );
4244
* // returns [ ~0.082, ~0.918 ]
45+
*
4346
* @example
44-
* y = kernelBetaincinv( 1.0, 6.0, 0.8, 0.2 )
47+
* var y = kernelBetaincinv( 1.0, 6.0, 0.8, 0.2 );
4548
* // returns [ ~0.235, ~0.765 ]
4649
*/
4750
declare function kernelBetaincinv( a: number, b: number, p: number, q: number ): Array<number>;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ interface Namespace {
775775
*
776776
* @example
777777
* var x = ns.scalar2ndarray( 1.0, {
778-
* 'dtype': generic'
778+
* 'dtype': 'generic'
779779
* });
780780
* // returns <ndarray>
781781
*

lib/node_modules/@stdlib/ndarray/empty/docs/types/index.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ declare function empty( shape: Shape | number, options: Complex64Options ): comp
355355
*
356356
* @example
357357
* var arr = empty( [ 2, 2 ], {
358-
* 'dtype': int32'
358+
* 'dtype': 'int32'
359359
* });
360360
* // returns <ndarray>
361361
*
@@ -405,7 +405,7 @@ declare function empty( shape: Shape | number, options: Int16Options ): int16nda
405405
*
406406
* @example
407407
* var arr = empty( [ 2, 2 ], {
408-
* 'dtype': int8'
408+
* 'dtype': 'int8'
409409
* });
410410
* // returns <ndarray>
411411
*
@@ -430,7 +430,7 @@ declare function empty( shape: Shape | number, options: Int8Options ): int8ndarr
430430
*
431431
* @example
432432
* var arr = empty( [ 2, 2 ], {
433-
* 'dtype': uint32'
433+
* 'dtype': 'uint32'
434434
* });
435435
* // returns <ndarray>
436436
*
@@ -455,7 +455,7 @@ declare function empty( shape: Shape | number, options: Uint32Options ): uint32n
455455
*
456456
* @example
457457
* var arr = empty( [ 2, 2 ], {
458-
* 'dtype': uint16'
458+
* 'dtype': 'uint16'
459459
* });
460460
* // returns <ndarray>
461461
*
@@ -480,7 +480,7 @@ declare function empty( shape: Shape | number, options: Uint16Options ): uint16n
480480
*
481481
* @example
482482
* var arr = empty( [ 2, 2 ], {
483-
* 'dtype': uint8'
483+
* 'dtype': 'uint8'
484484
* });
485485
* // returns <ndarray>
486486
*
@@ -530,7 +530,7 @@ declare function empty( shape: Shape | number, options: Uint8COptions ): uint8cn
530530
*
531531
* @example
532532
* var arr = empty( [ 2, 2 ], {
533-
* 'dtype': bool'
533+
* 'dtype': 'bool'
534534
* });
535535
* // returns <ndarray>
536536
*
@@ -555,7 +555,7 @@ declare function empty( shape: Shape | number, options: BoolOptions ): boolndarr
555555
*
556556
* @example
557557
* var arr = empty( [ 2, 2 ], {
558-
* 'dtype': generic'
558+
* 'dtype': 'generic'
559559
* });
560560
* // returns <ndarray>
561561
*

0 commit comments

Comments
 (0)