Skip to content

[Feature Request]: run with output: 'pretty' option has return type of Promise<object | string> instead of Promise<string> #722

@Drew-Daniels

Description

@Drew-Daniels

Thanks for making node-jq! It's been really useful for a project I'm working on.

I noticed a small thing, where it looks like when you use run with the output option set to 'pretty', the return type of the function is Promise<object | string> instead of Promise<string>. I think it should be the latter because as I understand it, calling run(..., { output: 'pretty') should always result in a string, but maybe I'm oversimplifying.

Image

I'm using a workaround for this right now, but would be nice if the types could be updated so that when the output option is specified to "pretty" the return type is explicitly just Promise<string>:

Image

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