ieee754 icon indicating copy to clipboard operation
ieee754 copied to clipboard

index.d.tx: buffer can be ArrayLike<number>, and make sure it works in tests

Open gfx opened this issue 3 years ago • 1 comments

index.d.ts declares buffer is Uint8Array, but in fact it can be Array<number> or any kind of array-like object (ArrayLike<number> in TypeScript), so I've tweaked those declarations in index.d.ts and add tests to use Array as well as Buffer.

gfx avatar May 04 '21 03:05 gfx

The type could at least be defined as Uint8Array | Uint8ClampedArray, at the current moment having to do clampedArray as unknown as Uint8Array when using TS is not the best

WasabiThumb avatar Dec 13 '23 16:12 WasabiThumb