[Refactor] Update Litegraph widget types / cleanup (#3782)

This commit is contained in:
filtered
2025-05-06 19:40:30 +10:00
committed by GitHub
parent 6a3cf9e698
commit 0da6be5cdc
6 changed files with 20 additions and 6 deletions

View File

@@ -237,14 +237,14 @@ const renderPreview = (
class ImagePreviewWidget implements ICustomWidget {
readonly type: 'custom'
readonly name: string
readonly options: IWidgetOptions<unknown>
readonly options: IWidgetOptions<string | object>
/** Dummy value to satisfy type requirements. */
value: string
y: number = 0
/** Don't serialize the widget value. */
serialize: boolean = false
constructor(name: string, options: IWidgetOptions<unknown>) {
constructor(name: string, options: IWidgetOptions<string | object>) {
this.type = 'custom'
this.name = name
this.options = options