export declare class AlHtmlMatch {
name: string;
start: number;
end: number;
content: string;
attributes: {
[attribute: string]: string | boolean;
};
children: AlHtmlMatch[];
constructor(setStart?: number);
/**
* Get first child element of a given type
*/
first(childType: string): AlHtmlMatch | undefined;
/**
* Get all child elements of a given type
*/
all(childType: string): AlHtmlMatch[];
/**
* Coerces a given attribute into string form, with a default value
*/
attr(attribute: string, defaultValue?: string): string;
/**
* Coerces a given attribute into a boolean form, with a default value
*/
attrSwitch(attribute: string, defaultValue: boolean): boolean;
}
export declare class AlHtmlToJsonParser {
content: string;
offset: number;
prefix: string;
static reElement: RegExp;
static reAttribute: RegExp;
static reWhitespace: RegExp;
constructor(content: string, offset?: number, prefix?: string);
matchAll(): AlHtmlMatch[];
matchOne(): AlHtmlMatch | null;
extractElement(index: number, depth?: number): AlHtmlMatch;
protected contextualError(offset: number, reason: string): Error;
protected offsetToLocation(offset: number): {
row: number;
column: number;
};
}