[PR #4] [CLOSED] Fix build: suppress Jimp 1.6.0 type incompatibilities in image.js #3

Closed
opened 2026-10-15 18:08:50 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SillyTavern/transformers.js/pull/4
Author: @Copilot
Created: 3/15/2026
Status: ❌ Closed

Base: main ← Head: copilot/fix-npm-build-command


📝 Commits (2)

  • df1585f Initial plan
  • 30bb1ff Fix build: add @ts-ignore for Jimp type incompatibilities in image.js

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 packages/transformers/src/utils/image.js (+5 -0)

📄 Description

tsc --build (typegen step) fails with 5 type errors in src/utils/image.js due to Jimp 1.6.0's complex generic return types.

  • TS2322 (lines 415, 421, 582, 622): .resize() and .crop() return JimpInstanceMethods<...> which TS won't assign back to the instance variable, despite being the same type at runtime
  • TS2345 (line 773): .write(path) expects `${string}.${string}` template literal but receives string

Added @ts-ignore comments on all 5 lines, consistent with 80+ existing suppressions for similar library type issues throughout the codebase.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SillyTavern/transformers.js/pull/4 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 3/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `copilot/fix-npm-build-command` --- ### 📝 Commits (2) - [`df1585f`](https://github.com/SillyTavern/transformers.js/commit/df1585f11f5af7a56cf94fed310626122a80173c) Initial plan - [`30bb1ff`](https://github.com/SillyTavern/transformers.js/commit/30bb1ffb27ad9ba23e282faf0d3cb0b2dcf12003) Fix build: add @ts-ignore for Jimp type incompatibilities in image.js ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/transformers/src/utils/image.js` (+5 -0) </details> ### 📄 Description `tsc --build` (typegen step) fails with 5 type errors in `src/utils/image.js` due to Jimp 1.6.0's complex generic return types. - **TS2322 (lines 415, 421, 582, 622)**: `.resize()` and `.crop()` return `JimpInstanceMethods<...>` which TS won't assign back to the instance variable, despite being the same type at runtime - **TS2345 (line 773)**: `.write(path)` expects `` `${string}.${string}` `` template literal but receives `string` Added `@ts-ignore` comments on all 5 lines, consistent with 80+ existing suppressions for similar library type issues throughout the codebase. <!-- START COPILOT CODING AGENT TIPS --> --- 📱 Kick off Copilot coding agent tasks wherever you are with [GitHub Mobile](https://gh.io/cca-mobile-docs), available on iOS and Android. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 18:08:50 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/transformers.js#3
No description provided.