From 49c97dad4c6f56729796c46b6429e29b7cfcbd86 Mon Sep 17 00:00:00 2001 From: dontry Date: Wed, 17 May 2023 23:50:57 +1000 Subject: [PATCH] ignore ZenUML types --- package.json | 2 +- packages/mermaid-zenuml/src/zenumlRenderer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fe7a3ba00..611622029 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "build:vite": "ts-node-esm --transpileOnly .vite/build.ts", "build:mermaid": "pnpm build:vite --mermaid", "build:viz": "pnpm build:mermaid --visualize", - "build:types": "tsc -p ./packages/mermaid/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-example-diagram/tsconfig.json --emitDeclarationOnly", + "build:types": "tsc -p ./packages/mermaid/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-zenuml/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-example-diagram/tsconfig.json --emitDeclarationOnly", "build:watch": "pnpm build:vite --watch", "build": "pnpm run -r clean && pnpm build:types && pnpm build:vite", "dev": "concurrently \"pnpm build:vite --watch\" \"ts-node-esm .vite/server.ts\"", diff --git a/packages/mermaid-zenuml/src/zenumlRenderer.ts b/packages/mermaid-zenuml/src/zenumlRenderer.ts index 8ea5f4331..e8ab69cdd 100644 --- a/packages/mermaid-zenuml/src/zenumlRenderer.ts +++ b/packages/mermaid-zenuml/src/zenumlRenderer.ts @@ -53,7 +53,7 @@ export const draw = async function (text: string, id: string) { const { foreignObject, container, app } = createForeignObject(id); svgContainer.appendChild(foreignObject); - + // @ts-expect-error @zenuml/core@3.0.0 exports the wrong type for ZenUml const zenuml = new ZenUml(app); // default is a theme name. More themes to be added and will be configurable in the future await zenuml.render(text, 'theme-mermaid');