From 045dfbdfd924dc914032183e4508cd00a1ed3915 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Feb 2015 10:57:41 +0100 Subject: [PATCH] [xml2js] missing the Parser constructor on module --- xml2js/xml2js-tests.ts | 2 ++ xml2js/xml2js.d.ts | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/xml2js/xml2js-tests.ts b/xml2js/xml2js-tests.ts index f2d9dc41e..45472c0aa 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 f734e4ba0..33ad64978 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;