which-typed-array
Advanced tools
+8
-0
@@ -8,2 +8,10 @@ # Changelog | ||
| ## [v1.1.20](https://github.com/inspect-js/which-typed-array/compare/v1.1.19...v1.1.20) - 2026-01-14 | ||
| ### Commits | ||
| - [types] add Float16Array to TypedArray [`b04301f`](https://github.com/inspect-js/which-typed-array/commit/b04301f737aaa500ac2ee9a0578d6e3a52a65b94) | ||
| - [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `eslint`, `make-generator-function`, `npmignore` [`215b3a1`](https://github.com/inspect-js/which-typed-array/commit/215b3a1a39300a3a305d9f9b6885d00d44387ef6) | ||
| - [readme] replace runkit CI badge with shields.io check-runs badge [`32def83`](https://github.com/inspect-js/which-typed-array/commit/32def83f46fdfe0d324ed32de2146554855ed140) | ||
| ## [v1.1.19](https://github.com/inspect-js/which-typed-array/compare/v1.1.18...v1.1.19) - 2025-03-08 | ||
@@ -10,0 +18,0 @@ |
+14
-10
@@ -16,2 +16,3 @@ /** | ||
| declare function whichTypedArray(value: Float64Array): 'Float64Array'; | ||
| declare function whichTypedArray(value: Float16Array): 'Float16Array'; | ||
| declare function whichTypedArray(value: BigInt64Array): 'BigInt64Array'; | ||
@@ -33,2 +34,3 @@ declare function whichTypedArray(value: BigUint64Array): 'BigUint64Array'; | ||
| | 'Float64Array' | ||
| | 'Float16Array' | ||
| | 'BigInt64Array' | ||
@@ -39,12 +41,13 @@ | 'BigUint64Array'; | ||
| | Int8Array | ||
| | Uint8Array | ||
| | Uint8ClampedArray | ||
| | Int16Array | ||
| | Uint16Array | ||
| | Int32Array | ||
| | Uint32Array | ||
| | Float32Array | ||
| | Float64Array | ||
| | BigInt64Array | ||
| | BigUint64Array; | ||
| | Uint8Array | ||
| | Uint8ClampedArray | ||
| | Int16Array | ||
| | Uint16Array | ||
| | Int32Array | ||
| | Uint32Array | ||
| | Float32Array | ||
| | Float64Array | ||
| | Float16Array | ||
| | BigInt64Array | ||
| | BigUint64Array; | ||
@@ -61,2 +64,3 @@ export type TypedArrayConstructor = | ||
| | Float64ArrayConstructor | ||
| | Float16ArrayConstructor | ||
| | BigInt64ArrayConstructor | ||
@@ -63,0 +67,0 @@ | BigUint64ArrayConstructor; |
+10
-5
@@ -43,4 +43,8 @@ 'use strict'; | ||
| } | ||
| // @ts-expect-error TODO: fix | ||
| cache['$' + typedArray] = callBind(descriptor.get); | ||
| if (descriptor && descriptor.get) { | ||
| var bound = callBind(descriptor.get); | ||
| cache[ | ||
| /** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray) | ||
| ] = bound; | ||
| } | ||
| } | ||
@@ -53,8 +57,9 @@ }); | ||
| if (fn) { | ||
| cache[ | ||
| /** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray) | ||
| ] = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */ ( | ||
| var bound = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */ ( | ||
| // @ts-expect-error TODO FIXME | ||
| callBind(fn) | ||
| ); | ||
| cache[ | ||
| /** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray) | ||
| ] = bound; | ||
| } | ||
@@ -61,0 +66,0 @@ }); |
+6
-6
| { | ||
| "name": "which-typed-array", | ||
| "version": "1.1.19", | ||
| "version": "1.1.20", | ||
| "author": { | ||
@@ -72,4 +72,4 @@ "name": "Jordan Harband", | ||
| "devDependencies": { | ||
| "@arethetypeswrong/cli": "^0.17.4", | ||
| "@ljharb/eslint-config": "^21.1.1", | ||
| "@arethetypeswrong/cli": "^0.18.2", | ||
| "@ljharb/eslint-config": "^22.1.3", | ||
| "@ljharb/tsconfig": "^0.3.2", | ||
@@ -85,8 +85,8 @@ "@types/call-bind": "^1.0.5", | ||
| "encoding": "^0.1.13", | ||
| "eslint": "=8.8.0", | ||
| "eslint": "^8.57.1", | ||
| "in-publish": "^2.0.1", | ||
| "is-callable": "^1.2.7", | ||
| "make-arrow-function": "^1.2.0", | ||
| "make-generator-function": "^2.0.0", | ||
| "npmignore": "^0.3.1", | ||
| "make-generator-function": "^2.1.0", | ||
| "npmignore": "^0.3.5", | ||
| "nyc": "^10.3.2", | ||
@@ -93,0 +93,0 @@ "safe-publish-latest": "^2.0.0", |
+1
-1
@@ -69,3 +69,3 @@ # which-typed-array <sup>[![Version Badge][npm-version-svg]][package-url]</sup> | ||
| [codecov-url]: https://app.codecov.io/gh/inspect-js/which-typed-array/ | ||
| [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/which-typed-array | ||
| [actions-image]: https://img.shields.io/github/check-runs/inspect-js/which-typed-array/main | ||
| [actions-url]: https://github.com/inspect-js/which-typed-array/actions |
44832
2.09%277
3.36%