remove unnecessary lines

This commit is contained in:
Reda Al Sulais
2023-11-03 22:39:11 +03:00
parent 922bb1452f
commit 0a626917f8
2 changed files with 3 additions and 7 deletions

View File

@@ -1,3 +1,2 @@
export type { Info, Pie, PieSection } from './language/index.js'; export type { Info, Pie, PieSection } from './language/index.js';
export type { DiagramAST } from './parse.js'; export * from './parse.js';
export { parse, MermaidParseError } from './parse.js';

View File

@@ -6,17 +6,14 @@ import { createInfoServices, createPieServices } from './language/index.js';
export type DiagramAST = Info | Pie; export type DiagramAST = Info | Pie;
const parsers: Record<string, LangiumParser> = {}; const parsers: Record<string, LangiumParser> = {};
const initializers = { const initializers = {
info: () => { info: () => {
// Will have to make parse async to use this. Can try later... // Will have to make parse async to use this. Can try later...
// const { createInfoServices } = await import('./language/info/index.js'); // const { createInfoServices } = await import('./language/info/index.js');
const parser = createInfoServices().Info.parser.LangiumParser; parsers['info'] = createInfoServices().Info.parser.LangiumParser;
parsers['info'] = parser;
}, },
pie: () => { pie: () => {
const parser = createPieServices().Pie.parser.LangiumParser; parsers['pie'] = createPieServices().Pie.parser.LangiumParser;
parsers['pie'] = parser;
}, },
} as const; } as const;