Skip to content

Commit 56405e2

Browse files
authored
Apply suggestions from code review
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
1 parent ea43a3d commit 56405e2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface Routine {
4141
* gcircshift( x.length, 2, x, 1 );
4242
* // x => [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
4343
*/
44-
<T = unknown>( N: number, k: number, x: Collection<T>, strideX: number ): Collection<T>;
44+
<T = unknown, U extends Collection<T> = Collection<T>>( N: number, k: number, x: U, strideX: number ): U;
4545

4646
/**
4747
* Circularly shifts the elements of a strided array by a specified number of positions using alternative indexing semantics.
@@ -59,7 +59,7 @@ interface Routine {
5959
* gcircshift.ndarray( x.length, 2, x, 1, 0 );
6060
* // x => [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
6161
*/
62-
ndarray<T = unknown>( N: number, k: number, x: Collection<T>, strideX: number, offsetX: number ): Collection<T>;
62+
ndarray<T = unknown, U extends Collection<T> = Collection<T>>( N: number, k: number, x: U, strideX: number, offsetX: number ): U;
6363
}
6464

6565
/**

lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/types/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import gcircshift = require( './index' );
2525
{
2626
const x = new Float64Array( 10 );
2727

28-
gcircshift( x.length, 2, x, 1 ); // $ExpectType Collection<number>
28+
gcircshift( x.length, 2, x, 1 ); // $ExpectType Float64Array
2929
}
3030

3131
// The compiler throws an error if the function is provided a first argument which is not a number...
@@ -99,7 +99,7 @@ import gcircshift = require( './index' );
9999
{
100100
const x = new Float64Array( 10 );
101101

102-
gcircshift.ndarray( x.length, 2, x, 1, 0 ); // $ExpectType Collection<number>
102+
gcircshift.ndarray( x.length, 2, x, 1, 0 ); // $ExpectType Float64Array
103103
}
104104

105105
// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...

0 commit comments

Comments
 (0)