Skip to content

Commit 9a4b430

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

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/ndarray/iter/columns/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 nditerColumns( x: ndarray, options?: Options ): Iterator<ndarray>;
82+
declare function nditerColumns<T = unknown>( x: typedndarray<T>, options?: Options ): Iterator<typedndarray<T>>;
8383

8484

8585
// EXPORTS //

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

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

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