UNPKG

@panzer1119/bbcode-parser

Version:
24 lines (23 loc) 635 B
import { BBTag } from "./bbtag"; export declare enum TreeType { Root = 0, Text = 1, Tag = 2 } export declare class BBCodeParseTree { treeType: TreeType; content: string; attributes: { [key: string]: string; }; subTrees: BBCodeParseTree[]; constructor(treeType: TreeType, content: string, attributes?: { [key: string]: string; }, subTrees?: BBCodeParseTree[]); isValid(): boolean; toString(): string; static buildTree(str: string, bbTags: { [key: string]: BBTag; }): BBCodeParseTree | null; private static buildTreeFromTokens; }