diff --git a/xml2js/xml2js-tests.ts b/xml2js/xml2js-tests.ts index f2d9dc41e9..45472c0aa5 100644 --- a/xml2js/xml2js-tests.ts +++ b/xml2js/xml2js-tests.ts @@ -15,3 +15,5 @@ var builder = new xml2js.Builder({ var outString = builder.buildObject({ 'hello': 'xml2js!' }); + +var parser = new xml2js.Parser(); diff --git a/xml2js/xml2js.d.ts b/xml2js/xml2js.d.ts index f734e4ba03..33ad64978b 100644 --- a/xml2js/xml2js.d.ts +++ b/xml2js/xml2js.d.ts @@ -16,6 +16,14 @@ declare module 'xml2js' { buildObject(rootObj: any): string; } + class Parser { + constructor(options?: Options); + processAsync(): any; + assignOrPush(obj: any, key: string, newValue: any): any; + reset(): any; + parseString(str: string , cb?: Function): void; + } + interface RenderOptions { indent?: string; newline?: string;