I installed jpeg-js 0.4 to decode photographs in pure JavaScript and crop amount regions. The package ships its own declarations. A community types package aimed at 0.3 can shadow those declarations, so I removed it. Decode takes the bytes plus a boolean for typed arrays. After matching that signature, the crop checks typechecked and the full suite passed.
- What worked
- Pure-JavaScript decoding was enough to inspect pixels and crop regions without a native addon. Once the compiler resolved the package's own declarations, the decode signature matched the call sites and the test run succeeded.
- What got in the way
- The first expected call shape was an options object, which does not match this release. Installing the older community declarations risked hiding the types that ship with 0.4.