mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 09:45:13 +00:00
[Cleanup] Remove LiteGraph global type declarations (#2745)
This commit is contained in:
22
src/types/litegraph-core-augmentation.d.ts
vendored
22
src/types/litegraph-core-augmentation.d.ts
vendored
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
Extended types for litegraph, to be merged upstream once it has stabilized.
|
||||
Augmenting the LiteGraph type really didn't want to work, however doing it like this seems to allow it.
|
||||
*/
|
||||
declare module '@comfyorg/litegraph' {
|
||||
interface LiteGraphExtended {
|
||||
search_filter_enabled: boolean
|
||||
middle_click_slot_add_default_node: boolean
|
||||
registered_node_types: Record<string, LGraphNodeConstructor>
|
||||
registered_slot_out_types: Record<string, { nodes: string[] }>
|
||||
registered_slot_in_types: Record<string, { nodes: string[] }>
|
||||
slot_types_out: string[]
|
||||
slot_types_default_out: Record<string, string[]>
|
||||
slot_types_default_in: Record<string, string[]>
|
||||
|
||||
isValidConnection(type_a: ISlotType, type_b: ISlotType): boolean
|
||||
}
|
||||
|
||||
import type { LiteGraph as LG } from '@comfyorg/litegraph/dist/litegraph'
|
||||
export const LiteGraph: LiteGraphExtended & typeof LG
|
||||
export * from '@comfyorg/litegraph/dist/litegraph'
|
||||
}
|
||||
@@ -49,8 +49,9 @@ export class ConnectingLinkImpl implements ConnectingLink {
|
||||
this.releaseSlotType === 'output' ? newNode.outputs : newNode.inputs
|
||||
if (!newNodeSlots) return
|
||||
|
||||
const newNodeSlot = newNodeSlots.findIndex((slot: INodeSlot) =>
|
||||
LiteGraph.isValidConnection(slot.type, this.type)
|
||||
const newNodeSlot = newNodeSlots.findIndex(
|
||||
(slot: INodeSlot) =>
|
||||
this.type && LiteGraph.isValidConnection(slot.type, this.type)
|
||||
)
|
||||
|
||||
if (newNodeSlot === -1) {
|
||||
|
||||
Reference in New Issue
Block a user