Add events for Subgraph input/output changes (#1094)

This commit is contained in:
filtered
2025-07-01 12:36:41 -07:00
committed by GitHub
parent eb93bb3c22
commit c846ab80ae
2 changed files with 68 additions and 52 deletions

View File

@@ -0,0 +1,43 @@
import type { LGraphEventMap } from "./LGraphEventMap"
import type { SubgraphInput } from "@/subgraph/SubgraphInput"
import type { SubgraphOutput } from "@/subgraph/SubgraphOutput"
export interface SubgraphEventMap extends LGraphEventMap {
"adding-input": {
name: string
type: string
}
"adding-output": {
name: string
type: string
}
"input-added": {
input: SubgraphInput
}
"output-added": {
output: SubgraphOutput
}
"removing-input": {
input: SubgraphInput
index: number
}
"removing-output": {
output: SubgraphOutput
index: number
}
"renaming-input": {
input: SubgraphInput
index: number
oldName: string
newName: string
}
"renaming-output": {
output: SubgraphOutput
index: number
oldName: string
newName: string
}
}