mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 05:00:03 +00:00
[API] Rewrite LGraphCanvas.setGraph for subgraph (#1002)
Code search showed no usage. Fixes TS type on LGraph.
This commit is contained in:
@@ -30,12 +30,12 @@ export class Subgraph extends LGraph implements BaseLGraph, Serialisable<Exporte
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
get pathToRootGraph(): readonly [LGraph, ...GraphOrSubgraph[]] {
|
||||
get pathToRootGraph(): readonly [LGraph, ...Subgraph[]] {
|
||||
return [...this.parents, this]
|
||||
}
|
||||
|
||||
constructor(
|
||||
readonly parents: readonly [LGraph, ...GraphOrSubgraph[]],
|
||||
readonly parents: readonly [LGraph, ...Subgraph[]],
|
||||
data: ExportedSubgraph,
|
||||
) {
|
||||
if (!parents.length) throw new Error("Subgraph must have at least one parent")
|
||||
|
||||
Reference in New Issue
Block a user