forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmldom.d.ts
46 lines (36 loc) · 1.04 KB
/
xmldom.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Type definitions for xmldom 0.1.22
// Project: https://github.com/jindw/xmldom.git
// Definitions by: Qubo <https://github.com/tkqubo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "xmldom" {
namespace xmldom {
var DOMParser: DOMParserStatic;
var XMLSerializer: XMLSerializerStatic;
interface DOMParserStatic {
new(): DOMParser;
new(options: Options): DOMParser;
}
interface XMLSerializerStatic {
new(): XMLSerializer;
}
interface DOMParser {
parseFromString(xmlsource: string, mimeType?: string): Document;
}
interface XMLSerializer {
serializeToString(node: Node): string;
}
interface Options {
locator?: any;
errorHandler?: ErrorHandlerFunction|ErrorHandlerObject;
}
interface ErrorHandlerFunction {
(level: string, msg: any): any;
}
interface ErrorHandlerObject {
warning?: (msg: any) => any;
error?: (msg: any) => any;
fatalError?: (msg: any) => any;
}
}
export = xmldom;
}