Skip to content

Commit 4ec7a03

Browse files
committed
refactor: improve type specificity
1 parent 0fef28c commit 4ec7a03

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/ndarray/iter/rows/docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// <reference types="@stdlib/types"/>
2222

2323
import { TypedIterator, TypedIterableIterator } from '@stdlib/types/iter';
24-
import { ndarray } from '@stdlib/types/ndarray';
24+
import { typedndarray } from '@stdlib/types/ndarray';
2525

2626
// Define a union type representing both iterable and non-iterable iterators:
2727
type Iterator<T> = TypedIterator<T> | TypedIterableIterator<T>;
@@ -79,7 +79,7 @@ interface Options {
7979
*
8080
* // ...
8181
*/
82-
declare function nditerRows( x: ndarray, options?: Options ): Iterator<ndarray>;
82+
declare function nditerRows<T = unknown>( x: typedndarray<T>, options?: Options ): Iterator<typedndarray<T>>;
8383

8484

8585
// EXPORTS //

lib/node_modules/@stdlib/ndarray/iter/rows/docs/types/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import nditerRows = require( './index' );
2424

2525
// The function returns an iterator...
2626
{
27-
nditerRows( zeros( [ 2, 2 ] ) ); // $ExpectType Iterator<ndarray>
28-
nditerRows( zeros( [ 2, 2 ] ), {} ); // $ExpectType Iterator<ndarray>
27+
nditerRows( zeros( [ 2, 2 ] ) ); // $ExpectType Iterator<typedndarray<number>>
28+
nditerRows( zeros( [ 2, 2 ] ), {} ); // $ExpectType Iterator<typedndarray<number>>
2929
}
3030

3131
// The compiler throws an error if the function is provided a first argument which is not an ndarray...

0 commit comments

Comments
 (0)