node-csvtojson icon indicating copy to clipboard operation
node-csvtojson copied to clipboard

Keeping the type safety of user defined custom functions in TypeScript

Open iselcuk opened this issue 5 years ago • 0 comments

Custom parsers function

Let's say we want to create a custom parser function and reuse that in multiple columns, we would go for something like this:

colParser: { a: myCustomProcessFunction b: myCustomProcessFunction };

Since we define the myCustomProcessFunction outside of the object without a type, we are losing the type safety.

Could it be an option to export the types?

iselcuk avatar May 08 '20 08:05 iselcuk