[TS] Widget typing (#3804)

This commit is contained in:
filtered
2025-05-08 04:38:17 +10:00
committed by GitHub
parent bb1ac32ccd
commit b9d9ce78f9
12 changed files with 51 additions and 65 deletions

View File

@@ -35,10 +35,7 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
onRemove?: () => void
beforeQueued?: () => unknown
afterQueued?: () => unknown
serializeValue?: (
node: LGraphNode,
index: number
) => Promise<unknown> | unknown
serializeValue?(node: LGraphNode, index: number): Promise<unknown> | unknown
/**
* Refreshes the widget's value or options from its remote source.
@@ -66,6 +63,14 @@ declare module '@comfyorg/litegraph' {
new (): T
}
interface TextWidget {
dynamicPrompts?: boolean
}
interface BaseWidget {
serializeValue?(node: LGraphNode, index: number): Promise<unknown> | unknown
}
interface LGraphNode {
constructor: LGraphNodeConstructor