mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
refactor: Fix TypeScript errors workflow package (#9437)
This commit is contained in:
parent
2967df2fe0
commit
451e6590d6
|
@ -11,7 +11,7 @@
|
|||
"allowSyntheticDefaultImports": true,
|
||||
"resolveJsonModule": true,
|
||||
"baseUrl": ".",
|
||||
"types": ["vitest/globals"],
|
||||
"types": ["vitest/globals", "../workflow/src/types.d.ts"],
|
||||
"paths": {
|
||||
"@/*": ["src/*"],
|
||||
"n8n-design-system/*": ["../design-system/src/*"],
|
||||
|
|
|
@ -29,7 +29,7 @@ export function augmentArray<T>(data: T[]): T[] {
|
|||
}
|
||||
|
||||
const proxy = new Proxy(data, {
|
||||
deleteProperty(target, key: string) {
|
||||
deleteProperty(_target, key: string) {
|
||||
return Reflect.deleteProperty(getData(), key);
|
||||
},
|
||||
get(target, key: string, receiver): unknown {
|
||||
|
@ -59,7 +59,7 @@ export function augmentArray<T>(data: T[]): T[] {
|
|||
ownKeys(target) {
|
||||
return Reflect.ownKeys(newData ?? target);
|
||||
},
|
||||
set(target, key: string, newValue: unknown) {
|
||||
set(_target, key: string, newValue: unknown) {
|
||||
// Always proxy all objects. Like that we can check in get simply if it
|
||||
// is a proxy and it does then not matter if it was already there from the
|
||||
// beginning and it got proxied at some point or set later and so theoretically
|
||||
|
@ -143,7 +143,7 @@ export function augmentObject<T extends object>(data: T): T {
|
|||
);
|
||||
},
|
||||
|
||||
getOwnPropertyDescriptor(target, key) {
|
||||
getOwnPropertyDescriptor(_target, key) {
|
||||
if (deletedProperties.has(key)) return undefined;
|
||||
return Object.getOwnPropertyDescriptor(key in newData ? newData : data, key);
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { NativeDoc } from '@/Extensions/Extensions';
|
||||
import type { NativeDoc } from '../Extensions/Extensions';
|
||||
|
||||
export const arrayMethods: NativeDoc = {
|
||||
typeName: 'Array',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { NativeDoc } from '@/Extensions/Extensions';
|
||||
import type { NativeDoc } from '../Extensions/Extensions';
|
||||
|
||||
export const booleanMethods: NativeDoc = {
|
||||
typeName: 'Boolean',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { NativeDoc } from '@/Extensions/Extensions';
|
||||
import type { NativeDoc } from '../Extensions/Extensions';
|
||||
|
||||
export const numberMethods: NativeDoc = {
|
||||
typeName: 'Number',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { NativeDoc } from '@/Extensions/Extensions';
|
||||
import type { NativeDoc } from '../Extensions/Extensions';
|
||||
|
||||
export const objectMethods: NativeDoc = {
|
||||
typeName: 'Object',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { NativeDoc } from '@/Extensions/Extensions';
|
||||
import type { NativeDoc } from '../Extensions/Extensions';
|
||||
|
||||
export const stringMethods: NativeDoc = {
|
||||
typeName: 'String',
|
||||
|
|
|
@ -2,7 +2,7 @@ import { stringMethods } from './String.methods';
|
|||
import { arrayMethods } from './Array.methods';
|
||||
import { numberMethods } from './Number.methods';
|
||||
import { objectMethods } from './Object.Methods';
|
||||
import type { NativeDoc } from '@/Extensions/Extensions';
|
||||
import type { NativeDoc } from '../Extensions/Extensions';
|
||||
import { booleanMethods } from './Boolean.methods';
|
||||
|
||||
const NATIVE_METHODS: NativeDoc[] = [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { INode } from '@/Interfaces';
|
||||
import type { INode } from '../Interfaces';
|
||||
import { ExecutionBaseError } from './abstract/execution-base.error';
|
||||
|
||||
export class CredentialAccessError extends ExecutionBaseError {
|
||||
|
|
|
@ -6,8 +6,6 @@ import { NodeError } from './abstract/node.error';
|
|||
* Class for instantiating an operational error, e.g. an invalid credentials error.
|
||||
*/
|
||||
export class NodeOperationError extends NodeError {
|
||||
lineNumber: number | undefined;
|
||||
|
||||
type: string | undefined;
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -9,10 +9,6 @@ export class WorkflowOperationError extends ExecutionBaseError {
|
|||
|
||||
timestamp: number;
|
||||
|
||||
lineNumber: number | undefined;
|
||||
|
||||
description: string | undefined;
|
||||
|
||||
constructor(message: string, node?: INode, description?: string) {
|
||||
super(message, { cause: undefined });
|
||||
this.level = 'warning';
|
||||
|
|
Loading…
Reference in a new issue