Skip to content

Commit 5052a38

Browse files
committed
Auto-generated commit
1 parent 6b34a7c commit 5052a38

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@
480480

481481
### Bug Fixes
482482

483+
- [`519b1d3`](https://github.com/stdlib-js/stdlib/commit/519b1d3f8c95f09c8f173083ed52ea0b051b7140) - improve type specificity
483484
- [`01ab290`](https://github.com/stdlib-js/stdlib/commit/01ab29036205f4a0507133c1a4a7fd429bb7bd9e) - rename import in `ndarray/base/unary-strided1d-dispatch` to resolve conflict [(#9010)](https://github.com/stdlib-js/stdlib/pull/9010)
484485
- [`83a01e7`](https://github.com/stdlib-js/stdlib/commit/83a01e723e9037a2c402c1e60b54bc678ef27078) - enforce mostly-safe casting
485486
- [`e33ce98`](https://github.com/stdlib-js/stdlib/commit/e33ce98738a5fb62a81d17dbcd8b1b2606c6f208) - enforce mostly-safe casting
@@ -652,6 +653,7 @@ A total of 37 issues were closed in this release:
652653

653654
<details>
654655

656+
- [`519b1d3`](https://github.com/stdlib-js/stdlib/commit/519b1d3f8c95f09c8f173083ed52ea0b051b7140) - **fix:** improve type specificity _(by Athan Reines)_
655657
- [`3feb022`](https://github.com/stdlib-js/stdlib/commit/3feb02271d5335920ebbd4ca0268f0a24340e168) - **feat:** add `ndarray/flatten-from-by` [(#9040)](https://github.com/stdlib-js/stdlib/pull/9040) _(by Muhammad Haris, Athan Reines)_
656658
- [`a21edb1`](https://github.com/stdlib-js/stdlib/commit/a21edb10488a1a40457575ca21f07257c1ef5369) - **chore:** fix C lint errors [(#9111)](https://github.com/stdlib-js/stdlib/pull/9111) _(by Geo Daoyu)_
657659
- [`d360fe5`](https://github.com/stdlib-js/stdlib/commit/d360fe525de98bfac66993c5c54b13fffccab822) - **feat:** add `ndarray/base/to-reversed-dimension` [(#8852)](https://github.com/stdlib-js/stdlib/pull/8852) _(by Muhammad Haris, Athan Reines)_

from-scalar/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 { ComplexLike } from '@stdlib/types/complex';
24-
import { ndarray, float64ndarray, float32ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, complex128ndarray, complex64ndarray, boolndarray, DataType, Order } from '@stdlib/types/ndarray';
24+
import { float64ndarray, float32ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, complex128ndarray, complex64ndarray, genericndarray, boolndarray, DataType, Order } from '@stdlib/types/ndarray';
2525

2626
/**
2727
* Interface defining common options.
@@ -520,7 +520,7 @@ declare function scalar2ndarray( value: number, options: Uint8cOptions ): uint8c
520520
* var v = x.get();
521521
* // returns 1.0
522522
*/
523-
declare function scalar2ndarray( value: any, options?: Options ): ndarray;
523+
declare function scalar2ndarray<T = any>( value: T, options?: Options ): genericndarray<T>;
524524

525525

526526
// EXPORTS //

from-scalar/docs/types/test.ts

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

2424
// The function returns an ndarray...
2525
{
26-
scalar2ndarray( 1.0 ); // $ExpectType ndarray
26+
scalar2ndarray( 1.0 ); // $ExpectType genericndarray<number>
2727

2828
scalar2ndarray( 1.0, { 'dtype': 'float64' } ); // $ExpectType float64ndarray
2929
scalar2ndarray( 1.0, { 'dtype': 'float32' } ); // $ExpectType float32ndarray
@@ -37,7 +37,7 @@ import scalar2ndarray = require( './index' );
3737
scalar2ndarray( 1.0, { 'dtype': 'uint16' } ); // $ExpectType uint16ndarray
3838
scalar2ndarray( 1.0, { 'dtype': 'uint8' } ); // $ExpectType uint8ndarray
3939
scalar2ndarray( 1.0, { 'dtype': 'uint8c' } ); // $ExpectType uint8cndarray
40-
scalar2ndarray( 1.0, { 'dtype': 'generic' } ); // $ExpectType ndarray
40+
scalar2ndarray( 1.0, { 'dtype': 'generic' } ); // $ExpectType genericndarray<number>
4141
}
4242

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

0 commit comments

Comments
 (0)