refactor(editor): Upgrade frontend typing (no-changelog) (#9915)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-07-03 14:19:24 +02:00
committed by GitHub
parent b2f8ea7918
commit 7f8857f69b
40 changed files with 172 additions and 99 deletions

View File

@@ -141,7 +141,7 @@
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, watch } from 'vue';
import { createEventBus } from 'n8n-design-system/utils';
import type { IRunData, ConnectionTypes, Workflow } from 'n8n-workflow';
import type { IRunData, Workflow } from 'n8n-workflow';
import { jsonParse, NodeHelpers, NodeConnectionType } from 'n8n-workflow';
import type { IUpdateInformation, TargetItem } from '@/Interface';
@@ -175,14 +175,18 @@ import { useTelemetry } from '@/composables/useTelemetry';
import { useI18n } from '@/composables/useI18n';
import { storeToRefs } from 'pinia';
const emit = defineEmits([
'saveKeyboardShortcut',
'valueChanged',
'switchSelectedNode',
'openConnectionNodeCreator',
'redrawNode',
'stopExecution',
]);
const emit = defineEmits<{
(value: 'saveKeyboardShortcut', event: KeyboardEvent): void;
(value: 'valueChanged', parameterData: IUpdateInformation): void;
(value: 'switchSelectedNode', nodeTypeName: string): void;
(
value: 'openConnectionNodeCreator',
nodeTypeName: string,
connectionType: NodeConnectionType,
): void;
(value: 'redrawNode', nodeName: string): void;
(value: 'stopExecution'): void;
}>();
const props = withDefaults(
defineProps<{
@@ -597,7 +601,7 @@ const onSwitchSelectedNode = (nodeTypeName: string) => {
emit('switchSelectedNode', nodeTypeName);
};
const onOpenConnectionNodeCreator = (nodeTypeName: string, connectionType: ConnectionTypes) => {
const onOpenConnectionNodeCreator = (nodeTypeName: string, connectionType: NodeConnectionType) => {
emit('openConnectionNodeCreator', nodeTypeName, connectionType);
};