hash-wasm icon indicating copy to clipboard operation
hash-wasm copied to clipboard

`IDataType` type error

Open Fd929c2CE5fA opened this issue 7 months ago • 0 comments

Thank you first for developing this lib, it is really fast and easy to use. ❤️

https://github.com/Daninet/hash-wasm/blob/373b796205ab55fb4a657374dad6ea589bf75815/lib/util.ts#L14-L15

type Buffer = /*unresolved*/ any

Suggested fixes:

- export type ITypedArray = Uint8Array | Uint16Array | Uint32Array; 
- export type IDataType = string | Buffer | ITypedArray; 
+ export type IDataType = string | BufferSource; 

or

export type ITypedArray = Uint8Array | Uint16Array | Uint32Array; 
- export type IDataType = string | Buffer | ITypedArray; 
+ export type IDataType = string | ArrayBufferLike | ITypedArray; 

Fd929c2CE5fA avatar Jun 13 '25 16:06 Fd929c2CE5fA