refactor(editor): Standardize how we use defineEmits in components using the composition API (no-changelog) (#9934)

This commit is contained in:
Ricardo Espinoza
2024-07-04 03:30:51 -04:00
committed by GitHub
parent 7a3c127b2c
commit cef177455e
96 changed files with 212 additions and 222 deletions

View File

@@ -30,7 +30,7 @@ import type { IDataObject } from 'n8n-workflow';
import { useTelemetry } from '@/composables/useTelemetry';
const emit = defineEmits<{
(event: 'nodeTypeSelected', _: [actionKey: string, nodeName: string] | [nodeName: string]): void;
nodeTypeSelected: [value: [actionKey: string, nodeName: string] | [nodeName: string]];
}>();
const telemetry = useTelemetry();

View File

@@ -32,7 +32,7 @@ export interface Props {
}
const emit = defineEmits<{
(event: 'nodeTypeSelected', nodeTypes: string[]): void;
nodeTypeSelected: [nodeTypes: string[]];
}>();
const i18n = useI18n();

View File

@@ -49,8 +49,8 @@ const props = defineProps<Props>();
const { resetViewStacks } = useViewStacks();
const { registerKeyHook } = useKeyboardNavigation();
const emit = defineEmits<{
(event: 'closeNodeCreator'): void;
(event: 'nodeTypeSelected', value: string[]): void;
closeNodeCreator: [];
nodeTypeSelected: [value: string[]];
}>();
const uiStore = useUIStore();
const aiStore = useAIStore();

View File

@@ -38,7 +38,7 @@ withDefaults(defineProps<Props>(), {
});
const emit = defineEmits<{
(event: 'update:modelValue', value: string): void;
'update:modelValue': [value: string];
}>();
const state = reactive({