update the types in packages/workflow/src/utils.ts

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2022-11-02 13:47:14 +01:00
parent 76dcc05686
commit 6c60c72934

View file

@ -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 */
type Serializable = any & { toJSON?: (key?: any) => string };
type Serializable = { toJSON?: () => string };
export const deepCopy = <T extends any | Serializable>(
source: T,
hash = new WeakMap(),
path = '',
): T => {
export const deepCopy = <T>(source: T, hash = new WeakMap(), path = ''): T => {
let clone: any;
const hasOwnProp = Object.prototype.hasOwnProperty.bind(source);
// Primitives & Null & Function