Skip to content

Commit d6651d4

Browse files
committed
Update example code in namespace examples
1 parent 52153cb commit d6651d4

File tree

10 files changed

+164
-314
lines changed

10 files changed

+164
-314
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ interface COMPLEX {
4545
* @returns complex number
4646
*
4747
* @example
48-
* var z = complex( 5.0, 3.0, 'float64' );
48+
* var z = complex.complex( 5.0, 3.0, 'float64' );
4949
* // returns <Complex128>
5050
*/
5151
complex: typeof complx;
@@ -61,7 +61,7 @@ interface COMPLEX {
6161
*
6262
* var z = new Complex128( 5.0, 3.0 );
6363
*
64-
* var v = conj( z );
64+
* var v = complex.conj( z );
6565
* // returns <Complex128>
6666
*/
6767
conj: typeof conj;
@@ -87,7 +87,7 @@ interface COMPLEX {
8787
*
8888
* var z = new Complex128( 5.0, 3.0 );
8989
*
90-
* var im = imag( z );
90+
* var im = complex.imag( z );
9191
* // returns 3.0
9292
*/
9393
imag: typeof imag;
@@ -103,7 +103,7 @@ interface COMPLEX {
103103
*
104104
* var z = new Complex128( 5.0, 3.0 );
105105
*
106-
* var re = real( z );
106+
* var re = complex.real( z );
107107
* // returns 5.0
108108
*/
109109
real: typeof real;
@@ -119,15 +119,15 @@ interface COMPLEX {
119119
*
120120
* var z = new Complex128( 5.0, 3.0 );
121121
*
122-
* var out = reim( z );
122+
* var out = complex.reim( z );
123123
* // returns <Float64Array>[ 5.0, 3.0 ]
124124
*
125125
* @example
126126
* var Complex64 = require( `@stdlib/complex/float32` );
127127
*
128128
* var z = new Complex64( 5.0, 3.0 );
129129
*
130-
* var out = reim( z );
130+
* var out = complex.reim( z );
131131
* // returns <Float32Array>[ 5.0, 3.0 ]
132132
*/
133133
reim: typeof reim;

lib/node_modules/@stdlib/complex/docs/types/test.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,7 @@ import complex = require( './index' );
2323

2424
// TESTS //
2525

26-
// The exported object has the expected function interfaces...
26+
// The exported value is the expected interface...
2727
{
28-
complex.complex; // $ExpectType (real: number, imag: number, dtype?: "float64" | "float32" | undefined) => Complex
29-
complex.conj; // $ExpectType (z: Complex) => Complex
30-
complex.imag; // $ExpectType (z: ComplexLike) => number
31-
complex.real; // $ExpectType (z: ComplexLike) => number
32-
complex.reim; // $ExpectType (z: ComplexLike) => Float64Array | Float32Array
33-
complex.reviveComplex; // $ExpectType (key: string, value: any) => any
34-
complex.reviveComplex64; // $ExpectType (key: string, value: any) => any
35-
complex.reviveComplex128; // $ExpectType (key: string, value: any) => any
28+
complex; // $ExpectType COMPLEX
3629
}

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919
// TypeScript Version: 2.0
2020

21+
/* tslint:disable:max-line-length */
22+
/* tslint:disable:max-file-line-count */
23+
2124
import MAX_ARRAY_LENGTH = require( '@stdlib/constants/array/max-array-length' );
2225
import MAX_TYPED_ARRAY_LENGTH = require( '@stdlib/constants/array/max-typed-array-length' );
2326

@@ -29,7 +32,7 @@ interface ARRAY {
2932
* Maximum length of a generic array.
3033
*
3134
* @example
32-
* var len = MAX_ARRAY_LENGTH;
35+
* var len = array.MAX_ARRAY_LENGTH;
3336
* // returns 4294967295
3437
*/
3538
MAX_ARRAY_LENGTH: typeof MAX_ARRAY_LENGTH;
@@ -38,7 +41,7 @@ interface ARRAY {
3841
* Maximum length of a typed array.
3942
*
4043
* @example
41-
* var len = MAX_TYPED_ARRAY_LENGTH;
44+
* var len = array.MAX_TYPED_ARRAY_LENGTH;
4245
* // returns 9007199254740991
4346
*/
4447
MAX_TYPED_ARRAY_LENGTH: typeof MAX_TYPED_ARRAY_LENGTH;

lib/node_modules/@stdlib/constants/array/docs/types/test.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import array = require( './index' );
2323

2424
// TESTS //
2525

26-
// The exported object has the expected function interfaces...
26+
// The exported value is the expected interface...
2727
{
28-
array.MAX_ARRAY_LENGTH; // $ExpectType number
29-
array.MAX_TYPED_ARRAY_LENGTH; // $ExpectType number
28+
array; // $ExpectType ARRAY
3029
}

lib/node_modules/@stdlib/constants/docs/types/test.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ import constants = require( './index' );
2323

2424
// TESTS //
2525

26-
// The exported object has the expected function interfaces...
26+
// The exported value is the expected interface...
2727
{
28-
constants.array; // $ExpectType ARRAY
29-
constants.math; // $ExpectType MATH
30-
constants.string; // $ExpectType STRING
31-
constants.time; // $ExpectType TIME
28+
constants; // $ExpectType CONSTANTS
3229
}

0 commit comments

Comments
 (0)