Closed alexcaza closed 8 months ago
Turns out the issue was with using outdated bun-types
. I bumped the version within the lock file and updated the tests so that contributors going forward shouldn't have this issue.
Old versions of bun-types
used unknown
within expect
instead of proper type inference, which is why it flew under the radar.
Describe the bug Typescript seems to lift
CsvOutput
tostring
automatically despite it being aNewType
, so comparing the result ofgenerateCsv
tostring
won't give a type error.This can be see in this comment on PR #79.
The cause is unknown currently, but it's suspected to be a
tsconfig.json
setting that's missing, causing relaxed typechecking.Expected behavior
CsvOutput
should not be comparable to astring
without usingunpack
/asString
internally.