Skip to content

Commit b81b139

Browse files
committed
Auto-generated commit
1 parent 9c6f900 commit b81b139

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-05-08)
7+
## Unreleased (2025-05-15)
88

99
<section class="features">
1010

@@ -176,6 +176,7 @@ A total of 31 issues were closed in this release:
176176

177177
<details>
178178

179+
- [`b6df817`](https://github.com/stdlib-js/stdlib/commit/b6df81722b97af36092f9c6850f33e6d4795aaa4) - **docs:** fix types _(by Athan Reines)_
179180
- [`c29e97b`](https://github.com/stdlib-js/stdlib/commit/c29e97b6388cecff97906f3613880765b601da2a) - **docs:** update namespace table of contents [(#6948)](https://github.com/stdlib-js/stdlib/pull/6948) _(by stdlib-bot, Athan Reines)_
180181
- [`0f6d4e7`](https://github.com/stdlib-js/stdlib/commit/0f6d4e7694d458f76dc077d5b618e405f6cfed37) - **feat:** add `anyIsEntry` to namespace _(by Athan Reines)_
181182
- [`fbffea0`](https://github.com/stdlib-js/stdlib/commit/fbffea0a7be15b6013111fd0b613548d7c09a1b7) - **feat:** add `array/base/assert/any-is-entry` _(by Athan Reines)_

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ Utkarsh <http://[email protected]>
174174
Utkarsh Raj <[email protected]>
175175
UtkershBasnet <[email protected]>
176176
Vaibhav Patel <[email protected]>
177+
Vara Rahul Rajana <[email protected]>
177178
Varad Gupta <[email protected]>
178179
Vinit Pandit <[email protected]>
179180
Vivek Maurya <[email protected]>

typed/docs/types/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
/// <reference types="@stdlib/types"/>
2424

25-
import { RealOrComplexTypedArray, TypedDataTypeMap } from '@stdlib/types/array';
25+
import { RealOrComplexTypedArray, TypedDataTypeMap, Collection } from '@stdlib/types/array';
26+
import { Iterator } from '@stdlib/types/iter';
2627
import ArrayBuffer = require( './../../../buffer' );
2728

2829
/**
@@ -100,7 +101,7 @@ declare function typedarray<T extends keyof TypedDataTypeMap = 'float64'>( typed
100101
* var arr = typedarray( [ 5, -3 ], 'int32' );
101102
* // returns <Int32Array>[ 5, -3 ]
102103
*/
103-
declare function typedarray<T extends keyof TypedDataTypeMap = 'float64'>( obj: ArrayLike<number> | Iterable<any>, dtype?: T ): TypedDataTypeMap[T];
104+
declare function typedarray<T extends keyof TypedDataTypeMap = 'float64'>( obj: Collection<unknown> | Iterator, dtype?: T ): TypedDataTypeMap[T];
104105

105106
/**
106107
* Creates a typed array.

typed/docs/types/test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,20 @@
1616
* limitations under the License.
1717
*/
1818

19+
import array2iterator = require( './../../../to-iterator' );
20+
import ArrayBuffer = require( './../../../buffer' );
1921
import typedarray = require( './index' );
2022

2123

2224
// TESTS //
2325

24-
// The function returns a typed array..
26+
// The function returns a typed array...
2527
{
2628
typedarray(); // $ExpectType Float64Array
29+
typedarray( [ 1, 2, 3 ] ); // $ExpectType Float64Array
30+
typedarray( array2iterator( [ 1, 2, 3 ] ) ); // $ExpectType Float64Array
31+
typedarray( new ArrayBuffer( 10 ) ); // $ExpectType Float64Array
32+
2733
typedarray( 'float32' ); // $ExpectType Float32Array
2834
typedarray( 10, 'float32' ); // $ExpectType Float32Array
2935
typedarray( [ 1, 2, 3 ], 'int32' ); // $ExpectType Int32Array

0 commit comments

Comments
 (0)