Hello Sir Greetings.I want to discuss that I am unable to use the library in typescript React js. Sir Overall Your library is amazing actually I wanted to parse and fetch XML data and use as array.In JSx the below code works fine.
let parser = new xml2js.Parser();
parser.parseString(
`
Test
<from>Test1</from>
<heading>Test email</heading>
<body>Email regards to xml data parsing in React</body>
</email>`,
function (error:string,result:string) {
console.log(result);
}
);
In the React use Effect and gives the expected output but in typescript file the error is in this line let parser = new xml2js.Parser();It says Property 'Parser' does not exist on type 'typeof Parser'.Sir can you please help me about the issue.Thanks. Respectfully yoursMuhammad Bilal
Hello Sir Greetings.I want to discuss that I am unable to use the library in typescript React js. Sir Overall Your library is amazing actually I wanted to parse and fetch XML data and use as array.In JSx the below code works fine. let parser = new xml2js.Parser(); parser.parseString( `
In the React use Effect and gives the expected output but in typescript file the error is in this line let parser = new xml2js.Parser();It says Property 'Parser' does not exist on type 'typeof Parser'.Sir can you please help me about the issue.Thanks. Respectfully yoursMuhammad Bilal