refactored import and add support for subcollections

This commit is contained in:
daniel31x13
2024-02-17 20:08:34 -05:00
parent c3c74b8162
commit 7b7b979b20
5 changed files with 174 additions and 136 deletions
+22
View File
@@ -0,0 +1,22 @@
declare module "himalaya" {
export interface Attribute {
key: string;
value: string;
}
export interface TextNode {
type: "text";
content: string;
}
export type Node = TextNode | Element;
export interface Element {
type: "element";
tagName: string;
attributes: Attribute[];
children: Node[];
}
export function parse(html: string): Node[];
}