mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-11 16:10:05 +00:00
Add TS types / merge ComfyLGraphNode (#902)
* Add TS type for LGraphNodeConstructor * Add TS type & move shared prop to parent * Add TS types - Comfy augmentations * nit - TS type * Merge ComfyLGNode into existing augmentations * nit - fix missed explicit type on import
This commit is contained in:
@@ -74,7 +74,6 @@ app.registerExtension({
|
||||
const link = app.graph.links[linkId]
|
||||
if (!link) return
|
||||
const node = app.graph.getNodeById(link.origin_id)
|
||||
// @ts-expect-error Nodes that extend LGraphNode will not have a static type property
|
||||
const type = node.constructor.type
|
||||
if (type === 'Reroute') {
|
||||
if (node === this) {
|
||||
@@ -113,7 +112,6 @@ app.registerExtension({
|
||||
if (!link) continue
|
||||
|
||||
const node = app.graph.getNodeById(link.target_id)
|
||||
// @ts-expect-error Nodes that extend LGraphNode will not have a static type property
|
||||
const type = node.constructor.type
|
||||
|
||||
if (type === 'Reroute') {
|
||||
@@ -179,7 +177,6 @@ app.registerExtension({
|
||||
}
|
||||
if (!targetWidget) {
|
||||
targetWidget = targetNode.widgets?.find(
|
||||
// @ts-expect-error fix widget types
|
||||
(w) => w.name === targetInput.widget.name
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user