From 2bb91f250e285d67156bef39cb6b650f66021b8b Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sat, 10 Dec 2022 15:32:47 +0800 Subject: [PATCH] fix: type errors --- packages/bytemd/src/editor.svelte | 1 - packages/plugin-mermaid/src/index.ts | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/bytemd/src/editor.svelte b/packages/bytemd/src/editor.svelte index 66cf2cd..2e5fe6c 100644 --- a/packages/bytemd/src/editor.svelte +++ b/packages/bytemd/src/editor.svelte @@ -7,7 +7,6 @@ createEditorUtils, findStartIndex, getBuiltinActions, - getBuiltinRightActions, handleImageUpload, } from './editor' import Help from './help.svelte' diff --git a/packages/plugin-mermaid/src/index.ts b/packages/plugin-mermaid/src/index.ts index b90a4ed..ce44faa 100644 --- a/packages/plugin-mermaid/src/index.ts +++ b/packages/plugin-mermaid/src/index.ts @@ -1,7 +1,7 @@ import en from './locales/en.json' import * as icons from '@icon-park/svg' import type { BytemdPlugin } from 'bytemd' -import type { Config, Mermaid } from 'mermaid' +import type { default as Mermaid, MermaidConfig } from 'mermaid' type Locale = { mermaid: string @@ -15,7 +15,7 @@ type Locale = { pie: string } -export interface BytemdPluginMermaidOptions extends Config { +export interface BytemdPluginMermaidOptions extends MermaidConfig { locale?: Partial } @@ -24,7 +24,7 @@ export default function mermaid({ ...mermaidConfig }: BytemdPluginMermaidOptions = {}): BytemdPlugin { const locale = { ...en, ..._locale } as Locale - let m: Mermaid + let m: typeof Mermaid const actionItems = [ {