mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
update the types in packages/workflow/src/utils.ts
This commit is contained in:
parent
76dcc05686
commit
6c60c72934
|
@ -1,12 +1,8 @@
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return */
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return */
|
||||||
|
|
||||||
type Serializable = any & { toJSON?: (key?: any) => string };
|
type Serializable = { toJSON?: () => string };
|
||||||
|
|
||||||
export const deepCopy = <T extends any | Serializable>(
|
export const deepCopy = <T>(source: T, hash = new WeakMap(), path = ''): T => {
|
||||||
source: T,
|
|
||||||
hash = new WeakMap(),
|
|
||||||
path = '',
|
|
||||||
): T => {
|
|
||||||
let clone: any;
|
let clone: any;
|
||||||
const hasOwnProp = Object.prototype.hasOwnProperty.bind(source);
|
const hasOwnProp = Object.prototype.hasOwnProperty.bind(source);
|
||||||
// Primitives & Null & Function
|
// Primitives & Null & Function
|
||||||
|
|
Loading…
Reference in a new issue