File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
lib/node_modules/@stdlib/ndarray/iter/rows/docs/types Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2121/// <reference types="@stdlib/types"/>
2222
2323import { 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:
2727type 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 //
Original file line number Diff line number Diff 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...
You can’t perform that action at this time.
0 commit comments