Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
12 changes: 2 additions & 10 deletions lib/node_modules/@stdlib/complex/base/wrap-function/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,16 @@ The function accepts the following arguments:
```javascript
var Complex64 = require( '@stdlib/complex/float32/ctor' );
var caddf = require( '@stdlib/complex/float32/base/add' );
var realf = require( '@stdlib/complex/float32/real' );
var imagf = require( '@stdlib/complex/float32/imag' );
var wrap = require( '@stdlib/complex/base/wrap-function' );

var f = wrap( caddf, 2, Complex64 );

// ...

var z = f( 3.0, 4.0 );
// returns <Complex64>
// returns <Complex64>[ 7.0, 0.0 ]

var re = realf( z );
// returns 7.0

var im = imagf( z );
// returns 0.0

console.log( '%d + %di', re, im );
console.log( z.toString() );
// => '7 + 0i'
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@
--------
> var f = {{alias}}( {{alias:@stdlib/complex/float32/base/add}}, 2, {{alias:@stdlib/complex/float32/ctor}} );
> var z = f( 3.0, 4.0 )
<Complex64>
> var re = {{alias:@stdlib/complex/float32/real}}( z )
7.0
> var im = {{alias:@stdlib/complex/float32/imag}}( z )
0.0
<Complex64>[ 7.0, 0.0 ]

See Also
--------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* @returns result
*/
type Nullary = () => any;

Check warning on line 35 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Unary function accepting complex numbers.
Expand All @@ -40,7 +40,7 @@
* @param x - input value
* @returns result
*/
type Unary = ( x: ComplexLike ) => any;

Check warning on line 43 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Unary function accepting both real and complex numbers.
Expand All @@ -48,7 +48,7 @@
* @param x - input value
* @returns result
*/
type WrappedUnary = ( x: RealOrComplex ) => any;

Check warning on line 51 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Binary function accepting complex numbers.
Expand All @@ -57,7 +57,7 @@
* @param y - input value
* @returns result
*/
type Binary = ( x: ComplexLike, y: ComplexLike ) => any;

Check warning on line 60 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Binary function accepting both real and complex numbers.
Expand All @@ -66,7 +66,7 @@
* @param y - input value
* @returns result
*/
type WrappedBinary = ( x: RealOrComplex, y: RealOrComplex ) => any;

Check warning on line 69 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Ternary function accepting complex numbers.
Expand All @@ -76,7 +76,7 @@
* @param z - input value
* @returns result
*/
type Ternary = ( x: ComplexLike, y: ComplexLike, z: ComplexLike ) => any;

Check warning on line 79 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Ternary function accepting both real and complex numbers.
Expand All @@ -86,7 +86,7 @@
* @param z - input value
* @returns result
*/
type WrappedTernary = ( x: RealOrComplex, y: RealOrComplex, z: RealOrComplex ) => any;

Check warning on line 89 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Quaternary function accepting complex numbers.
Expand All @@ -97,7 +97,7 @@
* @param w - input value
* @returns result
*/
type Quaternary = ( x: ComplexLike, y: ComplexLike, z: ComplexLike, w: ComplexLike ) => any;

Check warning on line 100 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Quaternary function accepting both real and complex numbers.
Expand All @@ -108,7 +108,7 @@
* @param w - input value
* @returns result
*/
type WrappedQuaternary = ( x: RealOrComplex, y: RealOrComplex, z: RealOrComplex, w: RealOrComplex ) => any;

Check warning on line 111 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Quinary function accepting complex numbers.
Expand All @@ -120,7 +120,7 @@
* @param v - input value
* @returns result
*/
type Quinary = ( x: ComplexLike, y: ComplexLike, z: ComplexLike, w: ComplexLike, v: ComplexLike ) => any;

Check warning on line 123 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Quinary function accepting both real and complex numbers.
Expand Down Expand Up @@ -193,13 +193,7 @@
* // ...
*
* var z = f();
* // returns <Complex64>
*
* var re = realf( z );
* // returns <number>
*
* var im = imagf( z );
* // returns <number>
* // returns <Complex64>[ <number>, <number>]

Check failure on line 196 in lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected entries [<number>,<number>], but observed [0.34973540902137756,0.954922616481781]
*/
declare function wrap( fcn: Nullary, nargs: 0, ctor: Constructor ): Nullary;

Expand All @@ -220,21 +214,13 @@
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var cidentityf = require( '@stdlib/complex/float32/base/identity' );
* var realf = require( '@stdlib/complex/float32/real' );
* var imagf = require( '@stdlib/complex/float32/imag' );
*
* var f = wrap( cidentityf, 1, Complex64 );
*
* // ...
*
* var z = f( 3.0 );
* // returns <Complex64>
*
* var re = realf( z );
* // returns 3.0
*
* var im = imagf( z );
* // returns 0.0
* // returns <Complex64>[ 3.0, 0.0 ]
*/
declare function wrap( fcn: Unary, nargs: 1, ctor: Constructor ): WrappedUnary;

Expand All @@ -255,21 +241,13 @@
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var caddf = require( '@stdlib/complex/float32/base/add' );
* var realf = require( '@stdlib/complex/float32/real' );
* var imagf = require( '@stdlib/complex/float32/imag' );
*
* var f = wrap( caddf, 2, Complex64 );
*
* // ...
*
* var z = f( 3.0, 4.0 );
* // returns <Complex64>
*
* var re = realf( z );
* // returns 7.0
*
* var im = imagf( z );
* // returns 0.0
* // returns <Complex64>[ 7.0, 0.0 ]
*/
declare function wrap( fcn: Binary, nargs: 2, ctor: Constructor ): WrappedBinary;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@

var Complex64 = require( '@stdlib/complex/float32/ctor' );
var caddf = require( '@stdlib/complex/float32/base/add' );
var realf = require( '@stdlib/complex/float32/real' );
var imagf = require( '@stdlib/complex/float32/imag' );
var wrap = require( './../lib' );

var f = wrap( caddf, 2, Complex64 );

// ...

var z = f( 3.0, 4.0 );
// returns <Complex64>
// returns <Complex64>[ 7.0, 0.0 ]

var re = realf( z );
// returns 7.0

var im = imagf( z );
// returns 0.0

console.log( '%d + %di', re, im );
console.log( z.toString() );
// => '7 + 0i'
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,15 @@
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var caddf = require( '@stdlib/complex/float32/base/add' );
* var realf = require( '@stdlib/complex/float32/real' );
* var imagf = require( '@stdlib/complex/float32/imag' );
* var wrap = require( '@stdlib/complex/base/wrap-function' );
*
* var f = wrap( caddf, 2, Complex64 );

Check warning on line 31 in lib/node_modules/@stdlib/complex/base/wrap-function/lib/index.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "caddf"
*
* // ...
*
* var z = f( 3.0, 4.0 );
* // returns <Complex64>
* // returns <Complex64>[ 7.0, 0.0 ]
*
* var re = realf( z );
* // returns 7.0
*
* var im = imagf( z );
* // returns 0.0
*/

// MODULES //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,14 @@
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var caddf = require( '@stdlib/complex/float32/base/add' );
* var realf = require( '@stdlib/complex/float32/real' );
* var imagf = require( '@stdlib/complex/float32/imag' );
*
* var f = wrap( caddf, 2, Complex64 );

Check warning on line 57 in lib/node_modules/@stdlib/complex/base/wrap-function/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "caddf"
*
* // ...
*
* var z = f( 3.0, 4.0 );
* // returns <Complex64>
* // returns <Complex64>[ 7.0, 0.0 ]
*
* var re = realf( z );
* // returns 7.0
*
* var im = imagf( z );
* // returns 0.0
*/
function wrap( fcn, nargs, ctor ) {
var fcns;
Expand Down
Loading