Skip to content

Commit

Permalink
Add Uint8ClampedArray to TypedArray type
Browse files Browse the repository at this point in the history
The [Uint8ClampedArray][1] type behaves very similarly to Uint8Array,
and should probably be mentioned among the other typed arrays.

This lines up with [d3's definition of TypedArray][2].

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray
[2]: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/d3-interpolate/index.d.ts#L44-L53
  • Loading branch information
magnostherobot committed Jul 9, 2024
1 parent ebadabb commit 0bfb6df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/typed-arrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
export type TypedArrayConstructor =
| Int8ArrayConstructor
| Uint8ArrayConstructor
| Uint8ClampedArrayConstructor
| Int16ArrayConstructor
| Uint16ArrayConstructor
| Int32ArrayConstructor
Expand All @@ -15,6 +16,7 @@ export type TypedArrayConstructor =
export type TypedArray =
| Int8Array
| Uint8Array
| Uint8ClampedArray
| Int16Array
| Uint16Array
| Int32Array
Expand Down

0 comments on commit 0bfb6df

Please sign in to comment.