fix(editor): Fix type errors in TriggerPanel.vue (no-changelog) (#9578)
This commit is contained in:
committed by
GitHub
parent
05f50c1926
commit
9419c28ff3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user