Skip to content

csv - parse takes undefined opt #4545

Closed

Description

@dsherret

Kind of confusing that the opt parameter here is opt?: undefined:

https://github.com/denoland/deno_std/blob/74fc8ff920991c4c79fa4c7647d855e5780db64c/csv/parse.ts#L326

...shouldn't that just not exist given the other overloads?

Activity

  1. added
    bug
    on Apr 3, 2024
  2. added
    good first issue
    PR welcome
    and removed on Apr 8, 2024
  3. fdemir commented on Apr 14, 2024

    @fdemir

    Should we remove the opt?: undefined from this overload?

  4. dsherret commented on Apr 14, 2024

    @dsherret
    ContributorAuthor

    Yeah, I think it should just be export function parse(input: string): string[][];

  5. Wencho8 commented on Apr 16, 2024

    @Wencho8
    Contributor

    I can work on this. Removing the extra comments and the opt parameter.

  6. added a commit that references this issue on Apr 16, 2024
  7. iuioiua commented on Apr 16, 2024

    @iuioiua
    Contributor

    Completed in #4598

  8. dandv commented on May 25, 2024

    @dandv
    Contributor

    Not sure what the status of this is, but I'm giving Deno a first try with a simple task: manipulate a CSV. Trying to figure out the parameters for parse in WebStorm is tricky, because the options object doesn't seem to be documented (only input is), but is used in the example:

    image

    I'm using jsr:@std/csv@^0.224.1.

  9. BlackAsLight commented on May 26, 2024

    @BlackAsLight
    Contributor

    Not sure what the status of this is, but I'm giving Deno a first try with a simple task: manipulate a CSV. Trying to figure out the parameters for parse in WebStorm is tricky, because the options object doesn't seem to be documented (only input is), but is used in the example:

    image

    I'm using jsr:@std/csv@^0.224.1.

    Looking at the documentation, parse has two overloads, with opt being a generic type that extends ParseOptions. Why opt isn't a Partial<ParseOptions> is unknown to me.

  10. iuioiua commented on May 29, 2024

    @iuioiua
    Contributor

    Re-opening this issue. It's weird that parse() is generic and could be cleaned up and documented better.

    Edit: I'll keep this open until CSV documentation is reviewed as part of achieving stabilization. Then, we can see if the documentation satisfies the shortcomings pointed out here.

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

    PR welcomebugcsvgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions