refactor(editor): Fix NodeView/Canvas related TS errors (#9581)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
oleg
2024-06-03 16:33:20 +02:00
committed by GitHub
parent 3298914bc4
commit 68420ca6be
23 changed files with 587 additions and 389 deletions

View File

@@ -68,7 +68,7 @@ export interface IConnection {
node: string;
// The type of the input on destination node (for example "main")
type: string;
type: NodeConnectionType;
// The output/input-index of destination node (if node has multiple inputs/outputs of the same type)
index: number;

View File

@@ -168,7 +168,8 @@ export class Workflow {
if (!connections.hasOwnProperty(sourceNode)) {
continue;
}
for (const type in connections[sourceNode]) {
for (const type of Object.keys(connections[sourceNode]) as NodeConnectionType[]) {
if (!connections[sourceNode].hasOwnProperty(type)) {
continue;
}