mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 09:20:03 +02:00
Expose detectType function
This commit is contained in:
@@ -7,7 +7,11 @@ import { MermaidConfig } from './config.type';
|
|||||||
import { log } from './logger';
|
import { log } from './logger';
|
||||||
import utils from './utils';
|
import utils from './utils';
|
||||||
import { mermaidAPI, ParseOptions, RenderResult } from './mermaidAPI';
|
import { mermaidAPI, ParseOptions, RenderResult } from './mermaidAPI';
|
||||||
import { registerLazyLoadedDiagrams, loadRegisteredDiagrams } from './diagram-api/detectType';
|
import {
|
||||||
|
registerLazyLoadedDiagrams,
|
||||||
|
loadRegisteredDiagrams,
|
||||||
|
detectType,
|
||||||
|
} from './diagram-api/detectType';
|
||||||
import type { ParseErrorFunction } from './Diagram';
|
import type { ParseErrorFunction } from './Diagram';
|
||||||
import { isDetailedError } from './utils';
|
import { isDetailedError } from './utils';
|
||||||
import type { DetailedError } from './utils';
|
import type { DetailedError } from './utils';
|
||||||
@@ -400,6 +404,7 @@ const mermaid: {
|
|||||||
initialize: typeof initialize;
|
initialize: typeof initialize;
|
||||||
contentLoaded: typeof contentLoaded;
|
contentLoaded: typeof contentLoaded;
|
||||||
setParseErrorHandler: typeof setParseErrorHandler;
|
setParseErrorHandler: typeof setParseErrorHandler;
|
||||||
|
detectType: typeof detectType;
|
||||||
} = {
|
} = {
|
||||||
startOnLoad: true,
|
startOnLoad: true,
|
||||||
mermaidAPI,
|
mermaidAPI,
|
||||||
@@ -412,6 +417,7 @@ const mermaid: {
|
|||||||
parseError: undefined,
|
parseError: undefined,
|
||||||
contentLoaded,
|
contentLoaded,
|
||||||
setParseErrorHandler,
|
setParseErrorHandler,
|
||||||
|
detectType,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default mermaid;
|
export default mermaid;
|
||||||
|
Reference in New Issue
Block a user