mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-08-17 17:31:44 +08:00
44 lines
771 B
TypeScript
44 lines
771 B
TypeScript
export type Node = Text | CData | Comment | Element | Instruction | Document;
|
|
|
|
export interface Text {
|
|
$ast: "Text";
|
|
content: string;
|
|
}
|
|
|
|
export interface CData {
|
|
$ast: "CData";
|
|
content: string;
|
|
}
|
|
|
|
export interface Attribute {
|
|
$ast: "Attribute";
|
|
name: string;
|
|
value: string;
|
|
}
|
|
|
|
export interface Comment {
|
|
$ast: "Comment";
|
|
content: string;
|
|
}
|
|
|
|
export interface Element {
|
|
$ast: "Element";
|
|
name: string;
|
|
closingName: string;
|
|
attributes: (Attribute | null)[];
|
|
subNodes: (Node | null)[];
|
|
}
|
|
|
|
export interface Instruction {
|
|
$ast: "Instruction";
|
|
name: string;
|
|
attributes: (Attribute | null)[];
|
|
}
|
|
|
|
export interface Document {
|
|
$ast: "Document";
|
|
prologs: (Node | null)[];
|
|
rootElement: Element | null;
|
|
}
|
|
|