export type TokenRole = 'open' | 'close' | 'block'; export interface Token { role: TokenRole; value: string; sequence?: string; tag?: TagType; groups?: { [key: string]: string; }; meta?: Record; } export interface TagType { element: string[]; aliases: string[]; opener: string[]; closer: string | null; precedence: number; isBlock: boolean; showDelimitersInEditorNodes: boolean; template: string; pattern: RegExp | null; tokenize(role: TokenRole, sequence: string, value: string): Token | null; toHTML: (token: Token, callback: Function) => string; toMarkdown: (element: HTMLElement, callback: Function) => string; toEditorNode: (token: Token, callback: Function) => Node | null; } export interface TagCollectionType { tags: TagType[]; map: Map; getByElementName(element: string): TagType | undefined; }