mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 13:27:15 +08:00
45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
// 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 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;
|