mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 01:40:51 +00:00
添加mermaid图表接口 (#85)
* 添加mermaid图表接口 * 添加类型文件 * Update package.json * Create next-env.d.ts
This commit is contained in:
19
client/src/types/mermaid.d.ts
vendored
Normal file
19
client/src/types/mermaid.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
declare module "mermaid" {
|
||||
import mermaidAPI from "mermaid";
|
||||
const mermaid: any;
|
||||
export default mermaid;
|
||||
|
||||
// 扩展 mermaidAPI
|
||||
interface MermaidAPI extends mermaidAPI.mermaidAPI {
|
||||
contentLoaded: (
|
||||
targetEl: Element,
|
||||
options?: mermaidAPI.mermaidAPI.Config
|
||||
) => void;
|
||||
}
|
||||
|
||||
const mermaidAPIInstance: MermaidAPI;
|
||||
export default mermaidAPIInstance;
|
||||
}
|
||||
type Dispatch = (action: Action) => void;
|
||||
|
||||
|
Reference in New Issue
Block a user