You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My tsconfig compiler target is and has been set to ES2021.
I'm not sure how this is solved properly. My guess would be to add generic type explicitly to all TypedArrays usages, since they use Uint8Array (Example) actually. Effectively changing type definition here into this:
export class Uint8ArrayWriter extends Writer<Uint8Array<ArrayBuffer>> { }
What do you think?
The text was updated successfully, but these errors were encountered:
Thank for the info. Actually, I don't use TS for development and I was not aware of this issue. I wonder how to deal with that. I guess somehow I would need to publish 2 index.d.ts files?
Thank you all for this great library! I appreciate using it in my project. I just tried to update my TypeScript version from
5.6.3
to5.7.2
.Starting with Typescript 5.7 typed arrays become generic. See:
ArrayBufferLike
microsoft/TypeScript#59417This affects for example the type definition of Uint8ArrayWriter
Previously with TypeScript 5.6.3 the following code typed
data
asArrayBuffer
, but starting with TypeScript > 5.7data
has typeArrayBufferLike
.My tsconfig compiler target is and has been set to ES2021.
I'm not sure how this is solved properly. My guess would be to add generic type explicitly to all
TypedArrays
usages, since they use Uint8Array (Example) actually. Effectively changing type definition here into this:What do you think?
The text was updated successfully, but these errors were encountered: