diff --git a/packages/mermaid/src/assignWithDepth.ts b/packages/mermaid/src/assignWithDepth.ts index 263b005bc..831825779 100644 --- a/packages/mermaid/src/assignWithDepth.ts +++ b/packages/mermaid/src/assignWithDepth.ts @@ -28,9 +28,9 @@ const assignWithDepth = ( dst: any, src: any, - { depth = 2, clobber = false }: { depth: number; clobber: boolean } = { depth: 2, clobber: false } + { depth = 2, clobber = false }: { depth?: number; clobber?: boolean } = {} ): any => { - const config = Object.assign({ depth, clobber }); + const config: { depth: number; clobber: boolean } = { depth, clobber }; if (Array.isArray(src) && !Array.isArray(dst)) { src.forEach((s) => assignWithDepth(dst, s, config)); return dst;