Fix types

This commit is contained in:
Sidharth Vinod 2024-01-24 13:59:16 +05:30
parent ed7dbb100d
commit f715863540
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
2 changed files with 5 additions and 6 deletions

View File

@ -1,12 +1,11 @@
import type { Info } from '@mermaid-js/parser';
import { parse } from '@mermaid-js/parser';
import { log } from '../../logger.js';
import type { ParserDefinition } from '../../diagram-api/types.js';
import { log } from '../../logger.js';
export const parser: ParserDefinition = {
parse: (input: string): void => {
const ast: Info = parse('info', input);
parse: async (input: string): Promise<void> => {
const ast: Info = await parse('info', input);
log.debug(ast);
},
};

View File

@ -77,8 +77,8 @@ const getNextFittingBlock = (
};
export const parser: ParserDefinition = {
parse: (input: string): void => {
const ast: Packet = parse('packet', input);
parse: async (input: string): Promise<void> => {
const ast: Packet = await parse('packet', input);
log.debug(ast);
populate(ast);
},