Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
* 'iter': 10
* };
*
* var RandomStream = randomStream;
* var stream = new RandomStream( 2.0, 5.0, 4.0, opts );
*
* stream.pipe( inspectStream( log ) );
Expand Down Expand Up @@ -190,6 +191,7 @@
* @param error - error
*
* @example
* var RandomStream = randomStream;
* var stream = new RandomStream( 2.0, 5.0, 4.0 );
* stream.on( 'error', onError );
*
Expand Down Expand Up @@ -227,6 +229,7 @@
* 'iter': 10
* };
*
* var RandomStream = randomStream;
* var stream = new RandomStream( 2.0, 5.0, 4.0, opts );
*
* stream.pipe( inspectStream( log ) );
Expand Down Expand Up @@ -279,7 +282,7 @@
* 'highWaterMark': 64
* };
*
* var createStream = RandomStream.factory( 2.0, 5.0, 4.0, opts );
* var createStream = randomStream.factory( 2.0, 5.0, 4.0, opts );
*
* // Create 10 identically configured streams...
* var streams = [];
Expand All @@ -288,7 +291,7 @@
* streams.push( createStream() );
* }
*/
factory( a: number, b: number, c: number, options?: Options ): ( ...args: Array<any> ) => RandomStream;

Check warning on line 294 in lib/node_modules/@stdlib/random/streams/triangular/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Returns a function for creating readable streams which generate pseudorandom numbers drawn from a triangular distribution.
Expand All @@ -304,7 +307,7 @@
* 'highWaterMark': 64
* };
*
* var createStream = RandomStream.factory( opts );
* var createStream = randomStream.factory( opts );
*
* // Create 10 identically configured streams...
* var streams = [];
Expand Down Expand Up @@ -338,7 +341,7 @@
* 'iter': 10
* };
*
* var stream = RandomStream.objectMode( 2.0, 5.0, 4.0, opts );
* var stream = randomStream.objectMode( 2.0, 5.0, 4.0, opts );
*
* stream.pipe( inspectStream.objectMode( log ) );
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ import RandomStream = require( './index' );

// The compiler throws an error if the constructor is provided invalid input arguments...
{
const s1 = new RandomStream( '2.0', 5.0, 4.0 ); // $ExpectError
const s2 = new RandomStream( 2.0, '5.0', 4.0 ); // $ExpectError
new RandomStream( '2.0', 5.0, 4.0 ); // $ExpectError
new RandomStream( 2.0, '5.0', 4.0 ); // $ExpectError
}

// The compiler throws an error if the `objectMode` method is provided invalid input arguments...
Expand Down Expand Up @@ -124,9 +124,9 @@ import RandomStream = require( './index' );

// The compiler throws an error if the constructor is provided insufficient arguments...
{
const s1 = new RandomStream(); // $ExpectError
const s2 = new RandomStream( 2.0 ); // $ExpectError
const s3 = new RandomStream( 2.0, 5.0 ); // $ExpectError
new RandomStream(); // $ExpectError
new RandomStream( 2.0 ); // $ExpectError
new RandomStream( 2.0, 5.0 ); // $ExpectError
}

// The compiler throws an error if the `objectMode` method is provided insufficient arguments...
Expand Down