Skip to content

Commit 0e16a7b

Browse files
committed
feat!: refactor declarations to preserve type info
1 parent 7785b17 commit 0e16a7b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/node_modules/@stdlib/random/iter/randn/docs/types/index.d.ts

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

2323
import * as random from '@stdlib/types/random';
24-
import { Iterator } from '@stdlib/types/iter';
24+
import { TypedIterator } from '@stdlib/types/iter';
2525

2626
/**
2727
* Interface defining function options.
@@ -61,7 +61,7 @@ interface Options {
6161
/**
6262
* Interface for iterators of pseudorandom numbers having integer values.
6363
*/
64-
interface RandIter extends Iterator {
64+
interface Iterator<T> extends TypedIterator<T> {
6565
/**
6666
* Underlying pseudorandom number generator.
6767
*/
@@ -120,7 +120,7 @@ interface RandIter extends Iterator {
120120
*
121121
* // ...
122122
*/
123-
declare function iterator( options?: Options ): RandIter;
123+
declare function iterator( options?: Options ): Iterator<number>;
124124

125125

126126
// EXPORTS //

lib/node_modules/@stdlib/random/iter/randn/docs/types/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import iterator = require( './index' );
2323

2424
// The function returns an iterator...
2525
{
26-
iterator(); // $ExpectType RandIter
27-
iterator( { 'iter': 10 } ); // $ExpectType RandIter
28-
iterator( { 'name': 'box-muller' } ); // $ExpectType RandIter
29-
iterator( { 'copy': false } ); // $ExpectType RandIter
26+
iterator(); // $ExpectType Iterator<number>
27+
iterator( { 'iter': 10 } ); // $ExpectType Iterator<number>
28+
iterator( { 'name': 'box-muller' } ); // $ExpectType Iterator<number>
29+
iterator( { 'copy': false } ); // $ExpectType Iterator<number>
3030
}
3131

3232
// The compiler throws an error if the function is provided an options argument which is not an object...

0 commit comments

Comments
 (0)