28 lines
812 B
TypeScript
28 lines
812 B
TypeScript
import * as xmldomRuntime from 'xmldom';
|
|
|
|
export interface IDOMParser {
|
|
parseFromString(source: string, mimeType: string): Document;
|
|
}
|
|
|
|
export interface IDOMParserConstructor {
|
|
new (): IDOMParser;
|
|
}
|
|
|
|
export interface IXMLSerializer {
|
|
serializeToString(node: Node): string;
|
|
}
|
|
|
|
export interface IXMLSerializerConstructor {
|
|
new (): IXMLSerializer;
|
|
}
|
|
|
|
export interface IXmlDomModule {
|
|
DOMParser: IDOMParserConstructor;
|
|
XMLSerializer: IXMLSerializerConstructor;
|
|
[key: string]: unknown;
|
|
}
|
|
|
|
export const DOMParser: IDOMParserConstructor = xmldomRuntime.DOMParser as unknown as IDOMParserConstructor;
|
|
export const XMLSerializer: IXMLSerializerConstructor = xmldomRuntime.XMLSerializer as unknown as IXMLSerializerConstructor;
|
|
export const xmldom: IXmlDomModule = xmldomRuntime as unknown as IXmlDomModule;
|