Skip to content

Parsing strategy .optional #307

Closed
Closed
@msalmonse

Description

@msalmonse

I wanted to add a —draft option to my command but I wanted to be able to optionally specify the draft text i.e. —draft or —draft Entwurf. Unfortunately I couldn't think of a way to handle it.

I think that there is a case for having optional arrays although I think there that specifying a minimum and maximum number of elements would be better.

I don't think that there is a good way of handling this with standard types so maybe a custom type should be a requirement, one that could take an optional value as an argument.

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