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

34
packages/editor-ui/src/jsplumb.d.ts vendored Normal file
View File

@@ -0,0 +1,34 @@
import type { Connection, Endpoint, EndpointRepresentation, AbstractConnector, Overlay } from '@jsplumb/core';
import type { NodeConnectionType } from 'n8n-workflow';
declare module '@jsplumb/core' {
interface EndpointRepresentation {
canvas: HTMLElement;
scope: NodeConnectionType;
}
interface AbstractConnector {
canvas: HTMLElement;
overrideTargetEndpoint: Endpoint;
}
interface Overlay {
canvas: HTMLElement;
}
interface Connection {
__meta: {
sourceOutputIndex: number;
targetNodeName: string;
targetOutputIndex: number;
sourceNodeName: string;
};
}
interface Endpoint {
scope: NodeConnectionType;
__meta: {
nodeName: string;
nodeId: string;
index: number;
totalEndpoints: number;
endpointLabelLength: number;
};
};
}