Skip to content

Commit

Permalink
chore: fix variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Jan 12, 2024
1 parent 6e77487 commit 4368c3b
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ interface NullaryFunction extends PRNG {
/**
* Interface for generating exponential distributed pseudorandom numbers without pre-specified parameter values.
*/
interface BinaryFunction extends PRNG {
interface UnaryFunction extends PRNG {
/**
* Returns an exponential distributed pseudorandom number.
*
Expand Down Expand Up @@ -199,7 +199,7 @@ interface Random extends PRNG {
* var v = myexponential( 2.3 );
* // returns <number>
*/
factory( options?: Options ): BinaryFunction;
factory( options?: Options ): UnaryFunction;
}

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

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

exponential.factory( { 'prng': 123 } ); // $ExpectError
exponential.factory( { 'prng': 'abc' } ); // $ExpectError
exponential.factory( { 'prng': null } ); // $ExpectError
exponential.factory( { 'prng': [] } ); // $ExpectError
exponential.factory( { 'prng': {} } ); // $ExpectError
exponential.factory( { 'prng': true ); // $ExpectError
exponential.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 exponential = require( './index' );
exponential.factory( 2.3, { 'state': null } ); // $ExpectError
exponential.factory( 2.3, { 'state': [] } ); // $ExpectError
exponential.factory( 2.3, { 'state': {} } ); // $ExpectError
exponential.factory( 2.3, { 'state': true ); // $ExpectError
exponential.factory( 2.3, { 'state': true } ); // $ExpectError
exponential.factory( 2.3, { 'state': ( x: number ): number => x } ); // $ExpectError

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ interface NullaryFunction extends PRNG {
/**
* Interface for generating geometric distributed pseudorandom numbers without pre-specified parameter values.
*/
interface BinaryFunction extends PRNG {
interface UnaryFunction extends PRNG {
/**
* Returns a geometric distributed pseudorandom number.
*
Expand Down Expand Up @@ -199,7 +199,7 @@ interface Random extends PRNG {
* var v = mygeometric( 0.3 );
* // returns <number>
*/
factory( options?: Options ): BinaryFunction;
factory( options?: Options ): UnaryFunction;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import geometric = require( './index' );
// Attached to main export is a `factory` method which returns a function...
{
geometric.factory( 0.3 ); // $ExpectType NullaryFunction
geometric.factory(); // $ExpectType BinaryFunction
geometric.factory( { 'copy': false } ); // $ExpectType BinaryFunction
geometric.factory(); // $ExpectType UnaryFunction
geometric.factory( { 'copy': false } ); // $ExpectType UnaryFunction
}

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

geometric.factory( { 'prng': 123 } ); // $ExpectError
geometric.factory( { 'prng': 'abc' } ); // $ExpectError
geometric.factory( { 'prng': null } ); // $ExpectError
geometric.factory( { 'prng': [] } ); // $ExpectError
geometric.factory( { 'prng': {} } ); // $ExpectError
geometric.factory( { 'prng': true ); // $ExpectError
geometric.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 geometric = require( './index' );
geometric.factory( 0.3, { 'state': null } ); // $ExpectError
geometric.factory( 0.3, { 'state': [] } ); // $ExpectError
geometric.factory( 0.3, { 'state': {} } ); // $ExpectError
geometric.factory( 0.3, { 'state': true ); // $ExpectError
geometric.factory( 0.3, { 'state': true } ); // $ExpectError
geometric.factory( 0.3, { 'state': ( x: number ): number => x } ); // $ExpectError

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ interface NullaryFunction extends PRNG {
/**
* Interface for generating Poisson distributed pseudorandom numbers without pre-specified parameter values.
*/
interface BinaryFunction extends PRNG {
interface UnaryFunction extends PRNG {
/**
* Returns a Poisson distributed pseudorandom number.
*
Expand Down Expand Up @@ -199,7 +199,7 @@ interface Random extends PRNG {
* var v = mypoisson( 2.3 );
* // returns <number>
*/
factory( options?: Options ): BinaryFunction;
factory( options?: Options ): UnaryFunction;
}

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

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

poisson.factory( { 'prng': 123 } ); // $ExpectError
poisson.factory( { 'prng': 'abc' } ); // $ExpectError
poisson.factory( { 'prng': null } ); // $ExpectError
poisson.factory( { 'prng': [] } ); // $ExpectError
poisson.factory( { 'prng': {} } ); // $ExpectError
poisson.factory( { 'prng': true ); // $ExpectError
poisson.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 poisson = require( './index' );
poisson.factory( 2.3, { 'state': null } ); // $ExpectError
poisson.factory( 2.3, { 'state': [] } ); // $ExpectError
poisson.factory( 2.3, { 'state': {} } ); // $ExpectError
poisson.factory( 2.3, { 'state': true ); // $ExpectError
poisson.factory( 2.3, { 'state': true } ); // $ExpectError
poisson.factory( 2.3, { 'state': ( x: number ): number => x } ); // $ExpectError

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ interface NullaryFunction extends PRNG {
/**
* Interface for generating Rayleigh distributed pseudorandom numbers without pre-specified parameter values.
*/
interface BinaryFunction extends PRNG {
interface UnaryFunction extends PRNG {
/**
* Returns a Rayleigh distributed pseudorandom number.
*
Expand Down Expand Up @@ -199,7 +199,7 @@ interface Random extends PRNG {
* var v = myrayleigh( 2.3 );
* // returns <number>
*/
factory( options?: Options ): BinaryFunction;
factory( options?: Options ): UnaryFunction;
}

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

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

rayleigh.factory( { 'prng': 123 } ); // $ExpectError
rayleigh.factory( { 'prng': 'abc' } ); // $ExpectError
rayleigh.factory( { 'prng': null } ); // $ExpectError
rayleigh.factory( { 'prng': [] } ); // $ExpectError
rayleigh.factory( { 'prng': {} } ); // $ExpectError
rayleigh.factory( { 'prng': true ); // $ExpectError
rayleigh.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 rayleigh = require( './index' );
rayleigh.factory( 2.3, { 'state': null } ); // $ExpectError
rayleigh.factory( 2.3, { 'state': [] } ); // $ExpectError
rayleigh.factory( 2.3, { 'state': {} } ); // $ExpectError
rayleigh.factory( 2.3, { 'state': true ); // $ExpectError
rayleigh.factory( 2.3, { 'state': true } ); // $ExpectError
rayleigh.factory( 2.3, { 'state': ( x: number ): number => x } ); // $ExpectError

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

Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/random/base/t/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 t-distributed pseudorandom numbers without pre-specified parameter values.
*/
interface BinaryFunction extends PRNG {
interface UnaryFunction extends PRNG {
/**
* Returns a t-distributed pseudorandom number.
*
Expand Down Expand Up @@ -199,7 +199,7 @@ interface Random extends PRNG {
* var v = myt( 2.3 );
* // returns <number>
*/
factory( options?: Options ): BinaryFunction;
factory( options?: Options ): UnaryFunction;
}

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

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

t.factory( { 'prng': 123 } ); // $ExpectError
t.factory( { 'prng': 'abc' } ); // $ExpectError
t.factory( { 'prng': null } ); // $ExpectError
t.factory( { 'prng': [] } ); // $ExpectError
t.factory( { 'prng': {} } ); // $ExpectError
t.factory( { 'prng': true ); // $ExpectError
t.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 t = require( './index' );
t.factory( 2.3, { 'state': null } ); // $ExpectError
t.factory( 2.3, { 'state': [] } ); // $ExpectError
t.factory( 2.3, { 'state': {} } ); // $ExpectError
t.factory( 2.3, { 'state': true ); // $ExpectError
t.factory( 2.3, { 'state': true } ); // $ExpectError
t.factory( 2.3, { 'state': ( x: number ): number => x } ); // $ExpectError

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

Expand Down

1 comment on commit 4368c3b

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
random/base/bernoulli $\color{green}391/391$
$\color{green}+100.00\%$
$\color{green}49/49$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}391/391$
$\color{green}+100.00\%$
random/base/chi $\color{green}376/376$
$\color{green}+100.00\%$
$\color{green}44/44$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}376/376$
$\color{green}+100.00\%$
random/base/chisquare $\color{green}375/375$
$\color{green}+100.00\%$
$\color{green}44/44$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}375/375$
$\color{green}+100.00\%$
random/base/exponential $\color{green}420/420$
$\color{green}+100.00\%$
$\color{green}46/46$
$\color{green}+100.00\%$
$\color{green}11/11$
$\color{green}+100.00\%$
$\color{green}420/420$
$\color{green}+100.00\%$
random/base/geometric $\color{red}472/475$
$\color{green}+99.37\%$
$\color{red}47/48$
$\color{green}+97.92\%$
$\color{green}11/11$
$\color{green}+100.00\%$
$\color{red}472/475$
$\color{green}+99.37\%$
random/base/poisson $\color{green}630/630$
$\color{green}+100.00\%$
$\color{green}68/68$
$\color{green}+100.00\%$
$\color{green}13/13$
$\color{green}+100.00\%$
$\color{green}630/630$
$\color{green}+100.00\%$
random/base/rayleigh $\color{green}430/430$
$\color{green}+100.00\%$
$\color{green}46/46$
$\color{green}+100.00\%$
$\color{green}11/11$
$\color{green}+100.00\%$
$\color{green}430/430$
$\color{green}+100.00\%$
random/base/t $\color{green}478/478$
$\color{green}+100.00\%$
$\color{green}77/77$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}478/478$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.