fix(editor): Fix type errors in TriggerPanel.vue (no-changelog) (#9578)

This commit is contained in:
Milorad FIlipović
2024-05-31 17:22:27 +02:00
committed by GitHub
parent 05f50c1926
commit 9419c28ff3
3 changed files with 60 additions and 60 deletions

View File

@@ -1,4 +1,9 @@
import type { INodeParameterResourceLocator, NodeConnectionType } from 'n8n-workflow';
import type {
INodeParameterResourceLocator,
INodeTypeDescription,
NodeConnectionType,
TriggerPanelDefinition,
} from 'n8n-workflow';
import { nodeConnectionTypes } from 'n8n-workflow';
import type { ICredentialsResponse, NewCredentialsModal } from '@/Interface';
@@ -56,3 +61,9 @@ export function isValidNodeConnectionType(
): connectionType is NodeConnectionType {
return nodeConnectionTypes.includes(connectionType as NodeConnectionType);
}
export function isTriggerPanelObject(
triggerPanel: INodeTypeDescription['triggerPanel'],
): triggerPanel is TriggerPanelDefinition {
return triggerPanel !== undefined && typeof triggerPanel === 'object' && triggerPanel !== null;
}