Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jan 12, 2024
1 parent 273976b commit 58e2d8c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/.keepalive

This file was deleted.

2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Copyright (c) 2016-2023 The Stdlib Authors.
Copyright (c) 2016-2024 The Stdlib Authors.
4 changes: 2 additions & 2 deletions docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ interface NullaryFunction extends PRNG {
/**
* Interface for generating chi-square distributed pseudorandom numbers without pre-specified parameter values.
*/
interface BinaryFunction extends PRNG {
interface UnaryFunction extends PRNG {
/**
* Returns a chi-square distributed pseudorandom number.
*
Expand Down Expand Up @@ -199,7 +199,7 @@ interface Random extends PRNG {
* var v = mychisquare( 2.3 );
* // returns <number>
*/
factory( options?: Options ): BinaryFunction;
factory( options?: Options ): UnaryFunction;
}

/**
Expand Down
12 changes: 6 additions & 6 deletions docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import chisquare = require( './index' );
// Attached to main export is a `factory` method which returns a function...
{
chisquare.factory( 2.3 ); // $ExpectType NullaryFunction
chisquare.factory(); // $ExpectType BinaryFunction
chisquare.factory( { 'copy': false } ); // $ExpectType BinaryFunction
chisquare.factory(); // $ExpectType UnaryFunction
chisquare.factory( { 'copy': false } ); // $ExpectType UnaryFunction
}

// The `factory` method returns a function which returns a number...
Expand Down Expand Up @@ -115,14 +115,14 @@ import chisquare = require( './index' );
chisquare.factory( 2.3, { 'prng': null } ); // $ExpectError
chisquare.factory( 2.3, { 'prng': [] } ); // $ExpectError
chisquare.factory( 2.3, { 'prng': {} } ); // $ExpectError
chisquare.factory( 2.3, { 'prng': true ); // $ExpectError
chisquare.factory( 2.3, { 'prng': true } ); // $ExpectError

chisquare.factory( { 'prng': 123 } ); // $ExpectError
chisquare.factory( { 'prng': 'abc' } ); // $ExpectError
chisquare.factory( { 'prng': null } ); // $ExpectError
chisquare.factory( { 'prng': [] } ); // $ExpectError
chisquare.factory( { 'prng': {} } ); // $ExpectError
chisquare.factory( { 'prng': true ); // $ExpectError
chisquare.factory( { 'prng': true } ); // $ExpectError
}

// The compiler throws an error if the `factory` method is provided a `seed` option which is not a valid seed...
Expand All @@ -149,15 +149,15 @@ import chisquare = require( './index' );
chisquare.factory( 2.3, { 'state': null } ); // $ExpectError
chisquare.factory( 2.3, { 'state': [] } ); // $ExpectError
chisquare.factory( 2.3, { 'state': {} } ); // $ExpectError
chisquare.factory( 2.3, { 'state': true ); // $ExpectError
chisquare.factory( 2.3, { 'state': true } ); // $ExpectError
chisquare.factory( 2.3, { 'state': ( x: number ): number => x } ); // $ExpectError

chisquare.factory( { 'state': 123 } ); // $ExpectError
chisquare.factory( { 'state': 'abc' } ); // $ExpectError
chisquare.factory( { 'state': null } ); // $ExpectError
chisquare.factory( { 'state': [] } ); // $ExpectError
chisquare.factory( { 'state': {} } ); // $ExpectError
chisquare.factory( { 'state': true ); // $ExpectError
chisquare.factory( { 'state': true } ); // $ExpectError
chisquare.factory( { 'state': ( x: number ): number => x } ); // $ExpectError
}

Expand Down

0 comments on commit 58e2d8c

Please sign in to comment.