mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 22:50:27 +00:00
Update Litegraph (TypeScript conversion) (#1145)
* Fix various type errors * Fix rest of ts errors * update litegraph * nit
This commit is contained in:
23
src/types/litegraph-augmentation.d.ts
vendored
23
src/types/litegraph-augmentation.d.ts
vendored
@@ -42,29 +42,6 @@ declare module '@comfyorg/litegraph' {
|
||||
): DOMWidget
|
||||
}
|
||||
|
||||
interface IWidget<TValue = any, TOptions = any> {
|
||||
type?: string
|
||||
|
||||
/**
|
||||
* Allows for additional cleanup when removing a widget when converting to input.
|
||||
*/
|
||||
onRemove?(): void
|
||||
|
||||
serializeValue?(node?: LGraphNode, i?: string)
|
||||
beforeQueued?(): void
|
||||
|
||||
/**
|
||||
* DOM element used for the widget
|
||||
*/
|
||||
element?: HTMLElement
|
||||
|
||||
tooltip?: string
|
||||
|
||||
origType?: IWidget['type']
|
||||
origComputeSize?: IWidget['computeSize']
|
||||
origSerializeValue?: IWidget['serializeValue']
|
||||
}
|
||||
|
||||
interface INodeSlot {
|
||||
widget?: unknown & { name?: string }
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import type {
|
||||
INodeOutputSlot,
|
||||
INodeSlot
|
||||
} from '@comfyorg/litegraph'
|
||||
import type { ISlotType } from '@comfyorg/litegraph'
|
||||
import { LiteGraph } from '@comfyorg/litegraph'
|
||||
|
||||
export class ConnectingLinkImpl implements ConnectingLink {
|
||||
@@ -39,7 +40,7 @@ export class ConnectingLinkImpl implements ConnectingLink {
|
||||
)
|
||||
}
|
||||
|
||||
get type(): string | null {
|
||||
get type(): ISlotType | null {
|
||||
const result = this.input ? this.input.type : this.output.type
|
||||
return result === -1 ? null : result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user