Skip to content

Commit 6be5d53

Browse files
committed
Auto-generated commit
1 parent e705947 commit 6be5d53

File tree

7 files changed

+32
-38
lines changed

7 files changed

+32
-38
lines changed

.github/workflows/npm_downloads.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ jobs:
8686
8787
# Upload the download data:
8888
- name: 'Upload data'
89-
# Pin action to full length commit SHA corresponding to v3.1.3
90-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
89+
# Pin action to full length commit SHA
90+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
9191
with:
9292
# Define a name for the uploaded artifact (ensuring a unique name for each job):
9393
name: npm_downloads

.github/workflows/publish.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,10 @@ jobs:
124124
mv ./package.json.tmp ./package.json
125125
fi
126126
done
127-
jq -r '.devDependencies | keys[]' ./package.json | while read -r dep; do
128-
if [[ "$dep" != "@stdlib"* ]]; then
129-
continue
130-
fi
131-
dep=$(echo "$dep" | xargs)
132-
if ! find lib -name "*.js" -exec grep -q "$dep" {} + && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then
133-
jq --indent 2 "del(.devDependencies[\"$dep\"])" ./package.json > ./package.json.tmp
134-
mv ./package.json.tmp ./package.json
135-
fi
136-
done
127+
128+
# Set `devDependencies` to an empty object:
129+
jq --indent 2 '.devDependencies = {}' ./package.json > ./package.json.tmp
130+
mv ./package.json.tmp ./package.json
137131
138132
# Remove CLI section:
139133
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"cli\">[\s\S]+?<\!\-\- \/.cli \-\->//"

.github/workflows/test_bundles.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ jobs:
168168

169169
# Install Deno:
170170
- name: 'Install Deno'
171-
# Pin action to full length commit SHA corresponding to v1.1.2
172-
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31
171+
# Pin action to full length commit SHA
172+
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba # v1.1.4
173173
with:
174174
deno-version: vx.x.x
175175

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
274274
[npm-image]: http://img.shields.io/npm/v/@stdlib/array-typed-complex.svg
275275
[npm-url]: https://npmjs.org/package/@stdlib/array-typed-complex
276276

277-
[test-image]: https://github.com/stdlib-js/array-typed-complex/actions/workflows/test.yml/badge.svg?branch=v0.2.0
278-
[test-url]: https://github.com/stdlib-js/array-typed-complex/actions/workflows/test.yml?query=branch:v0.2.0
277+
[test-image]: https://github.com/stdlib-js/array-typed-complex/actions/workflows/test.yml/badge.svg?branch=main
278+
[test-url]: https://github.com/stdlib-js/array-typed-complex/actions/workflows/test.yml?query=branch:main
279279

280280
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-typed-complex/main.svg
281281
[coverage-url]: https://codecov.io/github/stdlib-js/array-typed-complex?branch=main

docs/types/index.d.ts

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

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

25-
import { ArrayLike, ComplexTypedArray, ComplexFloatingPointDataType as DataType } from '@stdlib/types/array';
25+
import { ArrayLike, ComplexTypedArray, ComplexFloatingPointDataTypeMap as DataTypeMap } from '@stdlib/types/array';
2626
import ArrayBuffer = require( '@stdlib/array-buffer' );
2727

2828
/**
@@ -39,7 +39,7 @@ import ArrayBuffer = require( '@stdlib/array-buffer' );
3939
* var arr = complexarray( 'complex64');
4040
* // returns <Complex64Array>
4141
*/
42-
declare function complexarray( dtype?: DataType ): ComplexTypedArray;
42+
declare function complexarray<T extends keyof DataTypeMap = 'complex128'>( dtype?: T ): DataTypeMap[T];
4343

4444
/**
4545
* Creates a complex number typed array.
@@ -56,7 +56,7 @@ declare function complexarray( dtype?: DataType ): ComplexTypedArray;
5656
* var arr = complexarray( 2, 'complex64' );
5757
* // returns <Complex64Array>
5858
*/
59-
declare function complexarray( length: number, dtype?: DataType ): ComplexTypedArray;
59+
declare function complexarray<T extends keyof DataTypeMap = 'complex128'>( length: number, dtype?: T ): DataTypeMap[T];
6060

6161
/**
6262
* Creates a complex number typed array.
@@ -73,7 +73,7 @@ declare function complexarray( length: number, dtype?: DataType ): ComplexTypedA
7373
* var arr = complexarray( new Complex128Array( 2 ), 'complex64' );
7474
* // returns <Complex64Array>
7575
*/
76-
declare function complexarray( complexarray: ComplexTypedArray, dtype?: DataType ): ComplexTypedArray;
76+
declare function complexarray<T extends keyof DataTypeMap = 'complex128'>( complexarray: ComplexTypedArray, dtype?: T ): DataTypeMap[T];
7777

7878
/**
7979
* Creates a complex number typed array.
@@ -91,7 +91,7 @@ declare function complexarray( complexarray: ComplexTypedArray, dtype?: DataType
9191
* var arr = complexarray( [ 5, -3 ], 'complex64' );
9292
* // returns <Complex64Array>
9393
*/
94-
declare function complexarray( obj: ArrayLike<number> | Iterable<any>, dtype?: DataType ): ComplexTypedArray;
94+
declare function complexarray<T extends keyof DataTypeMap = 'complex128'>( obj: ArrayLike<number> | Iterable<any>, dtype?: T ): DataTypeMap[T];
9595

9696
/**
9797
* Creates a complex number typed array.
@@ -114,7 +114,7 @@ declare function complexarray( obj: ArrayLike<number> | Iterable<any>, dtype?: D
114114
* var arr = complexarray( buf, 'complex64' );
115115
* // returns <Complex64Array>
116116
*/
117-
declare function complexarray( buffer: ArrayBuffer, dtype?: DataType ): ComplexTypedArray;
117+
declare function complexarray<T extends keyof DataTypeMap = 'complex128'>( buffer: ArrayBuffer, dtype?: T ): DataTypeMap[T];
118118

119119
/**
120120
* Creates a complex number typed array.
@@ -138,7 +138,7 @@ declare function complexarray( buffer: ArrayBuffer, dtype?: DataType ): ComplexT
138138
* var arr = complexarray( buf, 16, 'complex64' );
139139
* // returns <Complex64Array>
140140
*/
141-
declare function complexarray( buffer: ArrayBuffer, byteOffset?: number, dtype?: DataType ): ComplexTypedArray;
141+
declare function complexarray<T extends keyof DataTypeMap = 'complex128'>( buffer: ArrayBuffer, byteOffset?: number, dtype?: T ): DataTypeMap[T];
142142

143143
/**
144144
* Creates a complex number typed array.
@@ -163,7 +163,7 @@ declare function complexarray( buffer: ArrayBuffer, byteOffset?: number, dtype?:
163163
* var arr = complexarray( buf, 16, 2, 'complex64' );
164164
* // returns <Complex64Array>
165165
*/
166-
declare function complexarray( buffer: ArrayBuffer, byteOffset?: number, length?: number, dtype?: DataType ): ComplexTypedArray;
166+
declare function complexarray<T extends keyof DataTypeMap = 'complex128'>( buffer: ArrayBuffer, byteOffset?: number, length?: number, dtype?: T ): DataTypeMap[T];
167167

168168

169169
// EXPORTS //

docs/types/test.ts

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

2424
// The function returns a typed array..
2525
{
26-
complexarray(); // $ExpectType ComplexTypedArray
27-
complexarray( 'complex64' ); // $ExpectType ComplexTypedArray
28-
complexarray( 10, 'complex64' ); // $ExpectType ComplexTypedArray
29-
complexarray( [ 1, 2, 3 ], 'complex128' ); // $ExpectType ComplexTypedArray
26+
complexarray(); // $ExpectType Complex128Array
27+
complexarray( 'complex64' ); // $ExpectType Complex64Array
28+
complexarray( 10, 'complex64' ); // $ExpectType Complex64Array
29+
complexarray( [ 1, 2, 3 ], 'complex128' ); // $ExpectType Complex128Array
3030
}
3131

3232
// The compiler throws an error if the function is provided a first argument which is not a data type, number, array-like object, or typed array...

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@
3939
"dependencies": {
4040
"@stdlib/array-defaults": "^0.2.0",
4141
"@stdlib/array-typed-complex-ctors": "^0.2.0",
42-
"@stdlib/assert-is-string": "^0.2.0",
43-
"@stdlib/string-format": "^0.2.0",
44-
"@stdlib/types": "^0.3.1"
42+
"@stdlib/assert-is-string": "^0.2.1",
43+
"@stdlib/string-format": "^0.2.1",
44+
"@stdlib/types": "^0.3.2"
4545
},
4646
"devDependencies": {
4747
"@stdlib/array-buffer": "^0.2.0",
48-
"@stdlib/array-complex128": "^0.1.0",
49-
"@stdlib/array-complex64": "^0.1.0",
50-
"@stdlib/array-float64": "^0.2.0",
51-
"@stdlib/assert-instance-of": "^0.2.0",
48+
"@stdlib/array-complex128": "^0.2.0",
49+
"@stdlib/array-complex64": "^0.2.0",
50+
"@stdlib/array-float64": "^0.2.1",
51+
"@stdlib/assert-instance-of": "^0.2.1",
5252
"@stdlib/assert-is-complex-typed-array": "^0.2.0",
53-
"@stdlib/blas-ext-base-gfill-by": "^0.1.0",
53+
"@stdlib/blas-ext-base-gfill-by": "^0.2.0",
5454
"@stdlib/complex-float64": "^0.2.0",
5555
"@stdlib/math-base-special-pow": "^0.2.0",
56-
"@stdlib/random-base-discrete-uniform": "^0.1.0",
57-
"@stdlib/strided-base-reinterpret-complex128": "^0.2.0",
56+
"@stdlib/random-base-discrete-uniform": "^0.2.0",
57+
"@stdlib/strided-base-reinterpret-complex128": "^0.2.1",
5858
"@stdlib/strided-base-reinterpret-complex64": "^0.2.0",
5959
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
6060
"istanbul": "^0.4.1",

0 commit comments

Comments
 (0)