Skip to content

Commit b723a6e

Browse files
committed
docs: fix errors in comments and clean-up
1 parent 1ca9f87 commit b723a6e

File tree

8 files changed

+37
-25
lines changed

8 files changed

+37
-25
lines changed

lib/node_modules/@stdlib/array/base/mskreject-map/docs/types/test.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,28 @@
1616
* limitations under the License.
1717
*/
1818

19-
import mskrejectMap from './index';
19+
import mskrejectMap = require( './index' );
20+
21+
22+
// FUNCTIONS //
23+
24+
function timesTwo( val: number ): number {
25+
return val * 2;
26+
}
27+
28+
function identity( val: string ): string {
29+
return val;
30+
}
31+
2032

2133
// TESTS //
2234

2335
// The function returns an array...
2436
{
25-
mskrejectMap( [ 1, 2, 3, 4 ], [ 0, 0, 0, 0 ], function( val ) { return val * 2 } ); // $ExpectType number[]
26-
mskrejectMap<any>( [ 1, 2, 3, 4 ], [ 0, 0, 0, 0 ], function( val ) { return val * 2 } ); // $ExpectType any[]
27-
mskrejectMap<number>( [ 1, 2, 3, 4 ], [ 0, 0, 0, 0 ], function( val ) { return val * 2 } ); // $ExpectType number[]
28-
mskrejectMap<string>( [ '1', '2', '3', '4' ], [ 0, 0, 0, 0 ], function( val ) { return val } ); // $ExpectType string[]
37+
mskrejectMap( [ 1, 2, 3, 4 ], [ 0, 0, 0, 0 ], timesTwo ); // $ExpectType number[]
38+
mskrejectMap<any>( [ 1, 2, 3, 4 ], [ 0, 0, 0, 0 ], timesTwo ); // $ExpectType any[]
39+
mskrejectMap<number>( [ 1, 2, 3, 4 ], [ 0, 0, 0, 0 ], timesTwo ); // $ExpectType number[]
40+
mskrejectMap<string>( [ '1', '2', '3', '4' ], [ 0, 0, 0, 0 ], identity ); // $ExpectType string[]
2941
}
3042

3143
// The compiler throws an error if the function is provided a first argument which is not an array-like object...

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ interface Namespace {
6161
*
6262
* ## Notes
6363
*
64-
* - The function differs from the `===` operator in that the function treats ``NaNs` as the same value.
64+
* - The function differs from the `===` operator in that the function treats `NaNs` as the same value.
6565
*
6666
* @param a - first input value
6767
* @param b - second input value

lib/node_modules/@stdlib/number/float64/base/assert/is-same-value-zero/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* ## Notes
2525
*
26-
* - The function differs from the `===` operator in that the function treats ``NaNs` as the same value.
26+
* - The function differs from the `===` operator in that the function treats `NaNs` as the same value.
2727
*
2828
* @param a - first input value
2929
* @param b - second input value

lib/node_modules/@stdlib/process/umask/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import umask = require( './index' );
2121

2222
// TESTS //
2323

24-
// The function returns a string or null...
24+
// The function returns a string or number...
2525
{
2626
umask(); // $ExpectType string | number
2727
umask( 0 ); // $ExpectType string | number

lib/node_modules/@stdlib/simulate/iter/bartlett-hann-pulse/docs/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ interface Options {
8484
* 'period': 10
8585
* };
8686
*
87-
* var iter = iterBarlettHannPulse( opts );
87+
* var iter = iterBartlettHannPulse( opts );
8888
*
8989
* var v = iter.next().value;
9090
* // returns <number>
@@ -97,9 +97,9 @@ interface Options {
9797
*
9898
* // ...
9999
*/
100-
declare function iterBarlettHannPulse( options?: Options ): Iterator;
100+
declare function iterBartlettHannPulse( options?: Options ): Iterator;
101101

102102

103103
// EXPORTS //
104104

105-
export = iterBarlettHannPulse;
105+
export = iterBartlettHannPulse;

lib/node_modules/@stdlib/simulate/iter/bartlett-pulse/docs/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ interface Options {
8484
* 'period': 10
8585
* };
8686
*
87-
* var iter = iterBarlettPulse( opts );
87+
* var iter = iterBartlettPulse( opts );
8888
*
8989
* var v = iter.next().value;
9090
* // returns <number>
@@ -97,9 +97,9 @@ interface Options {
9797
*
9898
* // ...
9999
*/
100-
declare function iterBarlettPulse( options?: Options ): Iterator;
100+
declare function iterBartlettPulse( options?: Options ): Iterator;
101101

102102

103103
// EXPORTS //
104104

105-
export = iterBarlettPulse;
105+
export = iterBartlettPulse;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
* return capitalize( p1 );
4141
* }
4242
*
43-
* var out = replace( str, /([^\s]*)/gi, replacer);
43+
* var out = replace( str, /([^\s]*)/gi, replacer );
4444
* // returns 'Oranges And Lemons Say The Bells Of St. Clement\'s'
4545
*/
46-
declare function repeat( str: string, search: RegExp, newval: string | Function ): string;
46+
declare function replace( str: string, search: RegExp, newval: string | Function ): string;
4747

4848

4949
// EXPORTS //
5050

51-
export = repeat;
51+
export = replace;

lib/node_modules/@stdlib/string/base/stickycase/docs/types/test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
* limitations under the License.
1717
*/
1818

19-
import stickycase from './index';
19+
import stickycase = require( './index' );
20+
2021

2122
// TESTS //
2223

@@ -39,13 +40,12 @@ import stickycase from './index';
3940

4041
// The compiler throws an error if the second parameter is not a number...
4142
{
42-
stickycase('hello world', true); // $ExpectError
43-
stickycase('hello world', false); // $ExpectError
44-
stickycase('hello world', undefined); // $ExpectError
45-
stickycase('hello world', 'test'); // $ExpectError
46-
stickycase('hello world', []); // $ExpectError
47-
stickycase('hello world', {}); // $ExpectError
48-
stickycase('hello world', (x: number): number => x); // $ExpectError
43+
stickycase( 'hello world', true ); // $ExpectError
44+
stickycase( 'hello world', false ); // $ExpectError
45+
stickycase( 'hello world', 'test' ); // $ExpectError
46+
stickycase( 'hello world', [] ); // $ExpectError
47+
stickycase( 'hello world', {} ); // $ExpectError
48+
stickycase( 'hello world', ( x: number ): number => x ); // $ExpectError
4949
}
5050

5151
// The compiler throws an error if the function is provided insufficient arguments...

0 commit comments

Comments
 (0)