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
The README for the DSV plugin sats that the processRow function can "either manipulate the passed row, or return an entirely new row object."
I would expect that:
manipulating the passed row and returning nothing should not be a type error
returning a new row object that includes numbers should not be a type error (one of the main purposes of using the function is to convert string values to Number or Date values)
Problem 1: there is an example in the README, but it gives a type error because the function doesn't return anything, so has a return type of void rather than undefined:
dsv({processRow: (row,id)=>{Object.keys(row).forEach((key)=>{varvalue=row[key];row[key]=isNaN(+value) ? value : +value;});}});
Problem 2: constructing a new row object gives a type error, because processRow is expected to return a value of type DSVRowString, which has the type definition
Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it. ⓘ
Expected Behavior / Situation
The README for the DSV plugin sats that the
processRow
function can "either manipulate the passedrow
, or return an entirely new row object."I would expect that:
row
and returning nothing should not be a type errorstring
values toNumber
orDate
values)Actual Behavior / Situation
The type definition for
processRow
is:Problem 1: there is an example in the README, but it gives a type error because the function doesn't return anything, so has a return type of
void
rather thanundefined
:Problem 2: constructing a new
row
object gives a type error, becauseprocessRow
is expected to return a value of typeDSVRowString
, which has the type definitionModification Proposal
Change the
processRow
type definition to something like:The text was updated successfully, but these errors were encountered: