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
{{ message }}
Repository navigation
Export for type OptionsWithColumns is missing #464
Argument of type Options<AgentRow> is not assignable to parameter of type OptionsWithColumns<AgentRow>
The reason is that a non-string declaration of parse expects OptionsWithColumns.
Proposed solution
The only way it works without exposing the type is to inline the options, but likely not everybody wants to do that, so exporting OptionsWithColumns would be great so they can simply be used as the type.
// Same definition as from library
type OptionsWithColumns<T> = Omit<Options<T>, "columns"> & {
columns: Exclude<Options["columns"], undefined | false>;
};
// Defining options with this will work
const options: OptionsWithColumns<RowType> = {
onRecord: (a) => a,
columns: ["a", "b", "c"]
}
const result = parse(content, options)
@wdavidw, I can see that there's csv-parse@6.2.0 tag, which seems to export OptionsWithColumns now, however there's no 6.2.0 release on npm. Are you planning to publish the 6.2.0 release on npm?
Activity
feat(csv-parse): with option `columns` (fix #461 #464)
feat(csv-parse): with option `columns` (fix #461 #464 #466)
feat(csv-parse): with option `columns` (fix #461 #464 #466)
feat(csv-parse): returned type generic for `on_record` (fix #461 #464 #…
leppa commentedon Mar 15, 2026
@wdavidw, I can see that there's csv-parse@6.2.0 tag, which seems to export
OptionsWithColumnsnow, however there's no 6.2.0 release on npm. Are you planning to publish the 6.2.0 release on npm?wdavidw commentedon Mar 17, 2026
Hi @leppa version 6.2.0 is now published.