n8n/packages/nodes-base/nodes/If/If.node.ts
Elias Meire e9b8d99084
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Benchmark Docker Image CI / build (push) Waiting to run
feat: Filter parameter: Improve loose type validation for booleans (#10702)
2024-09-09 08:54:36 +01:00

29 lines
781 B
TypeScript

import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
import { VersionedNodeType } from 'n8n-workflow';
import { IfV1 } from './V1/IfV1.node';
import { IfV2 } from './V2/IfV2.node';
export class If extends VersionedNodeType {
constructor() {
const baseDescription: INodeTypeBaseDescription = {
displayName: 'If',
name: 'if',
icon: 'fa:map-signs',
iconColor: 'green',
group: ['transform'],
description: 'Route items to different branches (true/false)',
defaultVersion: 2.2,
};
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
1: new IfV1(baseDescription),
2: new IfV2(baseDescription),
2.1: new IfV2(baseDescription),
2.2: new IfV2(baseDescription),
};
super(nodeVersions, baseDescription);
}
}