mirror of
https://github.com/colanode/colanode.git
synced 2026-05-18 05:05:03 +02:00
Between 0.2.9 and 0.3.0, there were changes in dependencies that caused the types to become incompatible between Uint8Array and FileSystemWriteChunkType where the base compatible type is ArrayBuffer but Uint8Array is based on ArrayBufferLike, which can be an ArrayBuffer but also can be a number of other incompatible types, and is thus incompatible with FileSystemWriteChunkType. I introduced a compatibility layer (Adapter Pattern-like) to copy the buffer into an ArrayBuffer if it is not an ArrayBuffer, otherwise just use the buffer if it already is.