diff --git a/src/fxp.d.ts b/src/fxp.d.ts index d622f27e..68bbc3d8 100644 --- a/src/fxp.d.ts +++ b/src/fxp.d.ts @@ -88,9 +88,11 @@ type ValidationError = { }; }; +type GenericObjectOrArray = Record | TValue[]; + export class XMLParser { constructor(options?: X2jOptionsOptional); - parse(xmlData: string | Buffer ,validationOptions?: validationOptionsOptional | boolean): any; + parse = GenericObjectOrArray>(xmlData: string | Buffer ,validationOptions?: validationOptionsOptional | boolean): TObject; /** * Add Entity which is not by default supported by this library * @param entityIndentifier {string} Eg: 'ent' for &ent; @@ -104,5 +106,5 @@ export class XMLValidator{ } export class XMLBuilder { constructor(options?: XmlBuilderOptionsOptional); - build(jObj: any): any; + build = GenericObjectOrArray>(jObj: TObject): string; }