Backwards Compatibility with Node Buffer
ORMIs there any easy way to ensure backwards compatibility with Node Buffers with Prisma, specifically in regards to TypeScript compatiblity.
TS is complaining about how Buffer is not assignable to Uint8Array<ArrayBuffer>. This is because Buffer is actually just Buffer<ArrayBufferLike> under the hood. Buffer<T> extends Uint8Array<T>, but TS does not seem to accept ArrayBufferLike as assignable to ArrayBuffer. My Node types do not include SharedArrayBuffer, so I'm rather confused.
I find it highly doubtful that there is an actual compatibility issue as Buffers are literally just UintArrays, but typescript has started complaining really hard. This type issue started after upgrading from version 6 to version 7.
What's the problem here?
TS is complaining about how Buffer is not assignable to Uint8Array<ArrayBuffer>. This is because Buffer is actually just Buffer<ArrayBufferLike> under the hood. Buffer<T> extends Uint8Array<T>, but TS does not seem to accept ArrayBufferLike as assignable to ArrayBuffer. My Node types do not include SharedArrayBuffer, so I'm rather confused.
I find it highly doubtful that there is an actual compatibility issue as Buffers are literally just UintArrays, but typescript has started complaining really hard. This type issue started after upgrading from version 6 to version 7.
What's the problem here?