Type INodeSlot.widget (#2463)

This commit is contained in:
Chenlei Hu
2025-02-07 14:33:21 -05:00
committed by GitHub
parent 117c8be3a0
commit 340513e27f
4 changed files with 5 additions and 11 deletions

8
package-lock.json generated
View File

@@ -11,7 +11,7 @@
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
"@comfyorg/comfyui-electron-types": "^0.4.16",
"@comfyorg/litegraph": "^0.8.69",
"@comfyorg/litegraph": "^0.8.70",
"@primevue/forms": "^4.2.5",
"@primevue/themes": "^4.2.5",
"@sentry/vue": "^8.48.0",
@@ -1944,9 +1944,9 @@
"license": "GPL-3.0-only"
},
"node_modules/@comfyorg/litegraph": {
"version": "0.8.69",
"resolved": "https://registry.npmjs.org/@comfyorg/litegraph/-/litegraph-0.8.69.tgz",
"integrity": "sha512-nc2A4V+nnP7rFgn2ZCwtNPiO2rsvVWgl+Djk/xQRv7G8Xhxyl04Md/w2JLyXvDABc4y3fRBTQ1f7bh0v7xa0SQ==",
"version": "0.8.70",
"resolved": "https://registry.npmjs.org/@comfyorg/litegraph/-/litegraph-0.8.70.tgz",
"integrity": "sha512-YZSMVzr/gUn7Xoe4orFjypq58faDy1kMvF1/kGTzmukF6w7WZ3tPjkng1ZBAWIztjcGDSmeTLYRayj5hfaDavA==",
"license": "MIT"
},
"node_modules/@cspotcode/source-map-support": {

View File

@@ -84,7 +84,7 @@
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
"@comfyorg/comfyui-electron-types": "^0.4.16",
"@comfyorg/litegraph": "^0.8.69",
"@comfyorg/litegraph": "^0.8.70",
"@primevue/forms": "^4.2.5",
"@primevue/themes": "^4.2.5",
"@sentry/vue": "^8.48.0",

View File

@@ -925,9 +925,7 @@ app.registerExtension({
for (const input of this.inputs) {
if (input.widget && !input.widget[GET_CONFIG]) {
input.widget[GET_CONFIG] = () =>
// @ts-expect-error input.widget has unknown type
getConfig.call(this, input.widget.name)
// @ts-expect-error input.widget has unknown type
const w = this.widgets.find((w) => w.name === input.widget.name)
if (w) {
hideWidget(this, w)

View File

@@ -105,10 +105,6 @@ declare module '@comfyorg/litegraph' {
/** Callback for pasting an image file into the node */
pasteFile?(file: File): void
}
interface INodeSlot {
widget?: unknown & { name?: string }
}
}
/**