htmljs-parser
Version:
An HTML parser recognizes content and string placeholders and allows JavaScript expressions as attribute values
28 lines (27 loc) • 736 B
TypeScript
import { type StateDefinition, type Ranges, type Meta, TagType } from "../internal";
export declare enum TAG_STAGE {
UNKNOWN = 0,
VAR = 1,
ARGUMENT = 2,
TYPES = 3,
PARAMS = 4,
ATTR_GROUP = 5
}
export interface OpenTagMeta extends Meta {
type: TagType;
stage: TAG_STAGE;
concise: boolean;
beginMixedMode?: boolean;
tagName: Ranges.Template;
shorthandEnd: number;
hasArgs: boolean;
hasAttrs: boolean;
hasParams: boolean;
typeParams: undefined | Ranges.Value;
hasShorthandId: boolean;
selfClosed: boolean;
indent: string;
nestedIndent: string | undefined;
parentTag: OpenTagMeta | undefined;
}
export declare const OPEN_TAG: StateDefinition<OpenTagMeta>;