mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
33 lines
703 B
TypeScript
33 lines
703 B
TypeScript
// Type definitions for xml-parser 1.2.1
|
|
// Project: https://github.com/segmentio/xml-parser
|
|
// Definitions by: Matt Frantz <https://github.com/mhfrantz>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
|
|
|
|
declare function parse(xml: string): parse.Document;
|
|
|
|
declare namespace parse {
|
|
export interface Document {
|
|
declaration: Declaration;
|
|
root: Node;
|
|
}
|
|
|
|
export interface Declaration {
|
|
attributes: Attributes;
|
|
}
|
|
|
|
export interface Node {
|
|
name: string;
|
|
attributes: Attributes;
|
|
children: Node[];
|
|
content?: string;
|
|
}
|
|
|
|
export interface Attributes {
|
|
[name: string]: string;
|
|
}
|
|
}
|
|
|
|
export = parse;
|