You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the package is published together with TypeScript files (which is bad practice), various errors occur depending on the build tool.
For example, the problem in this issue #92. Another example is when I want to enable the exactOptionalPropertyTypes option in the TypeScript config, it complains about the use of TS files in the node_modules folder, which we cannot fix.
node_modules/csv-writer/src/lib/csv-writer-factory.ts:30:85 - error TS2379: Argument of type '{ header: string[] | undefined; fieldDelimiter: string | undefined; recordDelimiter: string | undefined; alwaysQuote: boolean | undefined; }' is not assignable to parameter of type 'ArrayCsvStringifierParams' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'header' are incompatible.
Type 'string[] | undefined' is not assignable to type 'string[]'.
Type 'undefined' is not assignable to type 'string[]'.
30 const csvStringifier = this.csvStringifierFactory.createArrayCsvStringifier({
~
31 header: params.header,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
34 alwaysQuote: params.alwaysQuote
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 });
~~~~~~~~~
Please consider publishing the package with only JS files, along with type declarations (d.ts files).
The text was updated successfully, but these errors were encountered:
It seems that the original project may have been abandoned, so I decided to fork it. This problem has been resolved in my version, which only publishes the JavaScript files along with the index.d.ts declaration file. I'm also working on fixing other unsolved issues from the old project's list.
Because the package is published together with TypeScript files (which is bad practice), various errors occur depending on the build tool.
For example, the problem in this issue #92. Another example is when I want to enable the
exactOptionalPropertyTypes
option in the TypeScript config, it complains about the use of TS files in the node_modules folder, which we cannot fix.Please consider publishing the package with only JS files, along with type declarations (
d.ts
files).The text was updated successfully, but these errors were encountered: