JPEGLosslessDecoderJS icon indicating copy to clipboard operation
JPEGLosslessDecoderJS copied to clipboard

TypeScript 5.9 lib.d.ts fix

Open keean opened this issue 3 months ago • 0 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

To fix the types for TypeScript 5.9 lib.d.ts changes.

Here is the diff that solved my problem:

diff --git a/node_modules/jpeg-lossless-decoder-js/src/decoder.ts b/node_modules/jpeg-lossless-decoder-js/src/decoder.ts
index 798e8fb..8edd55e 100644
--- a/node_modules/jpeg-lossless-decoder-js/src/decoder.ts
+++ b/node_modules/jpeg-lossless-decoder-js/src/decoder.ts
@@ -53,7 +53,7 @@ export class Decoder {
   yDim = 0
   xLoc = 0
   yLoc = 0
-  outputData: Uint8Array | Uint16Array | null = null
+  outputData: Uint8Array<ArrayBuffer> | Uint16Array<ArrayBuffer> | null = null
   restarting = false
   mask = 0
   numBytes = 0

This issue body was partially generated by patch-package.

keean avatar Oct 15 '25 09:10 keean