Closed UglyHobbitFeet closed 1 year ago
Dunno if it's related or not, but importing it generates the following error in VsCode.
import { AsyncParser } from '@json2csv/node'; // <-- Error shows up here (aka red squiggly line)
const parseAsync = (data: string[], opts: { fields: string[] }, transformOpts: string[]) => new AsyncParser(opts, transformOpts).parse(data).promise();
Error:
Could not find a declaration file for module '@json2csv/node'. '/home/myPath/node_modules/@json2csv/node/src/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/json2csv__node` if it exists or add a new declaration (.d.ts) file containing `declare module '@json2csv/node';`ts(7016)
Hi @UglyHobbitFeet ,
This is cause by the lack of Typescript typings in the project as already raised in #1
I'm in the middle of porting the library to Typescript to provide the best possible support. In the meantime, check that other issue for the workaround which is to create you own type definition.
Sorry for the inconvenience!
Ok thanks!
On Sat, Jan 21, 2023, 6:27 AM Juanjo Diaz @.***> wrote:
Hi @UglyHobbitFeet https://github.com/UglyHobbitFeet ,
This is cause by the lack of Typescript typings in the project as already raised in #1 https://github.com/juanjoDiaz/json2csv/issues/1
I'm in the middle of porting the library to Typescript to provide the best possible support. In the meantime, check that other issue for the workaround which is to create you own type definition.
Sorry for the inconvenience!
— Reply to this email directly, view it on GitHub https://github.com/juanjoDiaz/json2csv/issues/12#issuecomment-1399232862, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBDS7QQJEPLVDYTWYDPBCTWTPBYNANCNFSM6AAAAAATYIL3P4 . You are receiving this because you were mentioned.Message ID: @.***>
I just released v7.0.0 which entirely rewrites @json2csv to typescript.
Let me know if you find any issues with it. This was a massive change.
Trying to build with Vue3 / Vite v4.0.4 and it won't compile. Stacktrace is: