mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(workflow): remove a few ts-ignore and eslint-disable (#3958)
fix(workflow): remove a few `ts-ignore` and `eslint-disable`. improve typing
This commit is contained in:
committed by
GitHub
parent
712924cbc3
commit
a73ac1d94f
@@ -352,7 +352,7 @@ export class WorkflowDataProxy {
|
||||
}
|
||||
|
||||
return new Proxy(
|
||||
{},
|
||||
{ binary: undefined, data: undefined, json: undefined },
|
||||
{
|
||||
get(target, name, receiver) {
|
||||
name = name.toString();
|
||||
@@ -472,8 +472,7 @@ export class WorkflowDataProxy {
|
||||
throw new Error(`The key "${name.toString()}" is not supported!`);
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
return that.workflow[name.toString()];
|
||||
return that.workflow[name as keyof typeof target];
|
||||
},
|
||||
},
|
||||
);
|
||||
@@ -1004,12 +1003,10 @@ export class WorkflowDataProxy {
|
||||
return new Proxy(base, {
|
||||
get(target, name, receiver) {
|
||||
if (['$data', '$json'].includes(name as string)) {
|
||||
// @ts-ignore
|
||||
return that.nodeDataGetter(that.activeNodeName, true).json;
|
||||
return that.nodeDataGetter(that.activeNodeName, true)?.json;
|
||||
}
|
||||
if (name === '$binary') {
|
||||
// @ts-ignore
|
||||
return that.nodeDataGetter(that.activeNodeName, true).binary;
|
||||
return that.nodeDataGetter(that.activeNodeName, true)?.binary;
|
||||
}
|
||||
|
||||
return Reflect.get(target, name, receiver);
|
||||
|
||||
Reference in New Issue
Block a user