mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): clear @ts-ignore from workflow and core packages (#4467)
* 📘 Clear all `@ts-ignore` comments from workflow package * 👕 Default to error with package-level overrides * refactor(core): clear all `@ts-ignore` comments from core package (#4473) 👕 Clear all `@ts-ignore` comments from core package * ✏️ Update comment
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
IN8nRequestOperations,
|
||||
INodeCredentialDescription,
|
||||
IExecuteData,
|
||||
INodeTypeDescription,
|
||||
} from '../src';
|
||||
|
||||
import * as Helpers from './Helpers';
|
||||
@@ -1689,8 +1690,7 @@ describe('RoutingNode', () => {
|
||||
connections: {},
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
nodeType.description = { ...testData.input.nodeType };
|
||||
nodeType.description = { ...testData.input.nodeType } as INodeTypeDescription;
|
||||
|
||||
const workflow = new Workflow({
|
||||
nodes: workflowData.nodes,
|
||||
@@ -1714,8 +1714,7 @@ describe('RoutingNode', () => {
|
||||
source: null,
|
||||
} as IExecuteData;
|
||||
|
||||
// @ts-ignore
|
||||
const nodeExecuteFunctions: INodeExecuteFunctions = {
|
||||
const nodeExecuteFunctions: Partial<INodeExecuteFunctions> = {
|
||||
getExecuteFunctions: () => {
|
||||
return Helpers.getExecuteFunctions(
|
||||
workflow,
|
||||
@@ -1751,7 +1750,7 @@ describe('RoutingNode', () => {
|
||||
runIndex,
|
||||
nodeType,
|
||||
executeData,
|
||||
nodeExecuteFunctions,
|
||||
nodeExecuteFunctions as INodeExecuteFunctions,
|
||||
);
|
||||
|
||||
expect(result).toEqual(testData.output);
|
||||
@@ -1763,12 +1762,7 @@ describe('RoutingNode', () => {
|
||||
const tests: Array<{
|
||||
description: string;
|
||||
input: {
|
||||
nodeType: {
|
||||
properties?: INodeProperties[];
|
||||
credentials?: INodeCredentialDescription[];
|
||||
requestDefaults?: IHttpRequestOptions;
|
||||
requestOperations?: IN8nRequestOperations;
|
||||
};
|
||||
nodeType: Partial<INodeTypeDescription>;
|
||||
node: {
|
||||
parameters: INodeParameters;
|
||||
};
|
||||
@@ -1868,8 +1862,7 @@ describe('RoutingNode', () => {
|
||||
connections: {},
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
nodeType.description = { ...testData.input.nodeType };
|
||||
nodeType.description = { ...testData.input.nodeType } as INodeTypeDescription;
|
||||
|
||||
const workflow = new Workflow({
|
||||
nodes: workflowData.nodes,
|
||||
@@ -1895,8 +1888,7 @@ describe('RoutingNode', () => {
|
||||
|
||||
let currentItemIndex = 0;
|
||||
for (let iteration = 0; iteration < inputData.main[0]!.length; iteration++) {
|
||||
// @ts-ignore
|
||||
const nodeExecuteFunctions: INodeExecuteFunctions = {
|
||||
const nodeExecuteFunctions: Partial<INodeExecuteFunctions> = {
|
||||
getExecuteFunctions: () => {
|
||||
return Helpers.getExecuteFunctions(
|
||||
workflow,
|
||||
@@ -1927,6 +1919,10 @@ describe('RoutingNode', () => {
|
||||
},
|
||||
};
|
||||
|
||||
if (!nodeExecuteFunctions.getExecuteSingleFunctions) {
|
||||
fail('Expected nodeExecuteFunctions to contain getExecuteSingleFunctions');
|
||||
}
|
||||
|
||||
const routingNodeExecutionContext = nodeExecuteFunctions.getExecuteSingleFunctions(
|
||||
routingNode.workflow,
|
||||
routingNode.runExecutionData,
|
||||
|
||||
Reference in New Issue
Block a user