UNPKG

589 BTypeScriptView Raw
1export interface IParserOptions {
2 /**
3 * WHATWG-compatible `fetch` function.
4 */
5 fetch?: typeof fetch;
6 /**
7 * XML/HTML parser from string into DOM Document.
8 */
9 DOMParser?: typeof DOMParser;
10}
11export default class Parser {
12 private readonly fetch;
13 private readonly DOMParser;
14 constructor({ fetch, DOMParser }?: IParserOptions);
15 parse(resource: string): Promise<Document>;
16 parseFromString(xml: string): Document;
17 private checkDocument;
18 load(url: string): Promise<Document>;
19}
20//# sourceMappingURL=Parser.d.ts.map
\No newline at end of file