Skip to content

Commit 0fef28c

Browse files
committed
refactor: improve type specificity
1 parent 9a4b430 commit 0fef28c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/ndarray/iter/matrices/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>;
@@ -73,7 +73,7 @@ interface Options {
7373
*
7474
* // ...
7575
*/
76-
declare function nditerMatrices( x: ndarray, options?: Options ): Iterator<ndarray>;
76+
declare function nditerMatrices<T = unknown>( x: typedndarray<T>, options?: Options ): Iterator<typedndarray<T>>;
7777

7878

7979
// EXPORTS //

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

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

2525
// The function returns an iterator...
2626
{
27-
nditerMatrices( zeros( [ 2, 2, 2 ] ) ); // $ExpectType Iterator<ndarray>
28-
nditerMatrices( zeros( [ 2, 2, 2 ] ), {} ); // $ExpectType Iterator<ndarray>
27+
nditerMatrices( zeros( [ 2, 2, 2 ] ) ); // $ExpectType Iterator<typedndarray<number>>
28+
nditerMatrices( zeros( [ 2, 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)