mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-26 10:49:38 +02:00
Fix types
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
import type { Info } from '@mermaid-js/parser';
|
import type { Info } from '@mermaid-js/parser';
|
||||||
import { parse } from '@mermaid-js/parser';
|
import { parse } from '@mermaid-js/parser';
|
||||||
|
|
||||||
import { log } from '../../logger.js';
|
|
||||||
import type { ParserDefinition } from '../../diagram-api/types.js';
|
import type { ParserDefinition } from '../../diagram-api/types.js';
|
||||||
|
import { log } from '../../logger.js';
|
||||||
|
|
||||||
export const parser: ParserDefinition = {
|
export const parser: ParserDefinition = {
|
||||||
parse: (input: string): void => {
|
parse: async (input: string): Promise<void> => {
|
||||||
const ast: Info = parse('info', input);
|
const ast: Info = await parse('info', input);
|
||||||
log.debug(ast);
|
log.debug(ast);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@@ -77,8 +77,8 @@ const getNextFittingBlock = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const parser: ParserDefinition = {
|
export const parser: ParserDefinition = {
|
||||||
parse: (input: string): void => {
|
parse: async (input: string): Promise<void> => {
|
||||||
const ast: Packet = parse('packet', input);
|
const ast: Packet = await parse('packet', input);
|
||||||
log.debug(ast);
|
log.debug(ast);
|
||||||
populate(ast);
|
populate(ast);
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user