Skip to content

Commit b55a8d9

Browse files
SamuelMarksfrontmesh
authored andcommitted
Wrote TypeScript definitions for html-parse-stringify (#11)
1 parent f683874 commit b55a8d9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

html-parse-stringify.d.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
declare var htmlParseStringify: htmlParseStringify.htmlParseStringify;
2+
3+
declare module htmlParseStringify {
4+
export interface htmlParseStringify {
5+
new (): htmlParseStringify;
6+
parse_tag(tag: string): IDoc;
7+
parse(html: string, options: IOptions): Array<any>;
8+
stringify(doc: IDoc): string;
9+
}
10+
11+
export interface IDoc {
12+
type: string;
13+
content?: string;
14+
voidElement: boolean;
15+
name: string;
16+
attrs: {};
17+
children: IDoc[];
18+
}
19+
20+
export interface IOptions {
21+
components: string[];
22+
}
23+
}
24+
25+
declare module "html-parse-stringify" {
26+
export = htmlParseStringify;
27+
}

0 commit comments

Comments
 (0)