Skip to content

Commit

Permalink
Revert "fix(types): make build and parse generic (#594)"
Browse files Browse the repository at this point in the history
This reverts commit 75acbc5.
  • Loading branch information
amitguptagwl committed Sep 24, 2023
1 parent 185dfea commit d18b062
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/fxp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ type ValidationError = {
};
};

type GenericObjectOrArray<TValue> = Record<string, unknown> | TValue[];

export class XMLParser {
constructor(options?: X2jOptionsOptional);
parse<TObject extends GenericObjectOrArray<unknown> = GenericObjectOrArray<unknown>>(xmlData: string | Buffer ,validationOptions?: validationOptionsOptional | boolean): TObject;
parse(xmlData: string | Buffer ,validationOptions?: validationOptionsOptional | boolean): any;
/**
* Add Entity which is not by default supported by this library
* @param entityIndentifier {string} Eg: 'ent' for &ent;
Expand All @@ -106,5 +104,5 @@ export class XMLValidator{
}
export class XMLBuilder {
constructor(options?: XmlBuilderOptionsOptional);
build<TObject extends GenericObjectOrArray<unknown> = GenericObjectOrArray<unknown>>(jObj: TObject): string;
build(jObj: any): any;
}

0 comments on commit d18b062

Please sign in to comment.