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

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 }
}
}
/**