mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Fix types
This commit is contained in:
parent
ed7dbb100d
commit
f715863540
@ -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);
|
||||
},
|
||||
};
|
||||
|
@ -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);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user