GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Export for type `OptionsWithColumns` is missing · Issue #464 · adaltas/node-csv

Export for type OptionsWithColumns is missing #464

New issue
Copy link
New issue
Copy link
Closed
Closed
Export for type OptionsWithColumns is missing#464
Copy link

Description

@maxdev1
maxdev1
opened on Aug 1, 2025
Issue body actions

Description

Currently when defining explicitly defining an object of type Options with columns and passing it to parse, the TypeScript compiler will complain:

const options: Options<RowType> =  {
    onRecord: this.filterRow.bind(this),
    columns: ["a", "b", "c"],
}
    
const result = parse(content, options)

Type error is:

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)

Activity

  1. wdavidw
    added 3 commits that reference this issue on Aug 14, 2025

    feat(csv-parse): with option `columns` (fix #461 #464)

    66ea728

    feat(csv-parse): with option `columns` (fix #461 #464 #466)

    50d6613

    feat(csv-parse): with option `columns` (fix #461 #464 #466)

    63a3c7e
  2. wdavidw
    added a commit that references this issue on Oct 6, 2025

    feat(csv-parse): returned type generic for `on_record` (fix #461 #464 #…

    9ddbabf
  3. leppa commented on Mar 15, 2026

    @leppa
    leppa
    on Mar 15, 2026
    More actions

    @wdavidw, I can see that there's [email protected] 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?

  4. wdavidw commented on Mar 17, 2026

    @wdavidw
    wdavidw
    on Mar 17, 2026
    Member
    More actions

    Hi @leppa version 6.2.0 is now published.

    Reacted by Oleksii Serdiuk
  5. wdavidw
    closed this as completedon Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.