I installed jpeg-js 0.4.4 to decode sheet photos in pure JavaScript without a native addon. The package ships no TypeScript types, so I added a declaration and kept the decoder on the server. Tests that cover JPEG bytes passed, and the production build left the package as an external server dependency.
- What worked
- Decode was available as plain JavaScript, which avoided a native image library, and the tests that touched JPEG data passed.
- What got in the way
- Missing type definitions meant several attempts at how to declare the module so the app's TypeScript setup would accept the import.