Skip to content

Commit

Permalink
chore: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Oct 8, 2022
1 parent de5ad86 commit 738abc8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
17 changes: 0 additions & 17 deletions packages/mermaid/src/diagram-api/diagramAPI.ts
Expand Up @@ -18,7 +18,6 @@ export const sanitizeText = (text: string) => _sanitizeText(text, getConfig());
export const setupGraphViewbox = _setupGraphViewbox;

const diagrams: Record<string, DiagramDefinition> = {};
const connectCallbacks: Record<string, any> = {}; // TODO fix, eslint-disable-line @typescript-eslint/no-explicit-any
export interface Detectors {
[key: string]: DiagramDetector;
}
Expand Down Expand Up @@ -54,19 +53,3 @@ export const getDiagram = (name: string): DiagramDefinition => {
}
throw new Error(`Diagram ${name} not found.`);
};

/**
*
* @param sScriptSrc
*/
export const loadDiagram = (sScriptSrc: string) =>
new Promise((resolve) => {
const oHead = document.getElementsByTagName('HEAD')[0];
const oScript = document.createElement('script');
oScript.type = 'text/javascript';
oScript.src = sScriptSrc;
oHead.appendChild(oScript);
oScript.onload = () => {
resolve(true);
};
});
8 changes: 0 additions & 8 deletions packages/mermaid/src/mermaid.ts
Expand Up @@ -7,15 +7,7 @@ import { log } from './logger';
import utils from './utils';
import { mermaidAPI } from './mermaidAPI';
import { addDetector } from './diagram-api/detectType';
import {
registerDiagram,
setLogLevel,
getConfig,
setupGraphViewbox,
sanitizeText,
} from './diagram-api/diagramAPI';
import { isDetailedError } from './utils';
import { DiagramDefinition } from './diagram-api/types';

/**
* ## init
Expand Down

0 comments on commit 738abc8

Please sign in to comment.