mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
xml-parser v1.2.1
This commit is contained in:
1 parent
5f48028783
commit
a8f2b8a2a1
2 files changed
+53
No files matched your search
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
// 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/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module 'xml-parser' {
|
||||
|
||||
function parse(xml: string): parse.Document;
|
||||
|
||||
module 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;
|
||||
}
|
||||
Reference in new issue
Block a user