I have this issue in TypeScript:
import axios from "axios";
import Papa from "papaparse";
axios.get("www.../data.csv").then(function (csvdata) {
const csvString = csvdata.data;
const parsed = Papa.parse(csvString, {
header: true,
dynamicTyping: true,
fastMode: true,
});
export const jsonData = parsed.data;
});
I tried to export const jsonData = parsed.data;
, but it doesn't compile (error: TS1184).
I need some insights into a possible solution.
Regards.