Skip to content

[Request] Export Option type #228

@richard174

Description

@richard174

Is your feature request related to a problem? Please describe.
I want to call a function every time a prompt is cancelled by CTRL-C, so I've created a wrapper function for each of the them. The "problem" I'm running into is that while trying other use generic type parameters (<Options extends Option<Value>[], Value>), the Option type is not exported from clack, so I need to define it myself.

Describe the solution you'd like
The simplest solution could be to just export the Option type. Alternatively, if onCancel was available for all prompts similarly to prompt groups, this could be avoided altogether.

Describe alternatives you've considered
Manually defining Option.

Additional context
Mainly a QoL thing with the Option type, but if you could look into onCancel on prompts, that would be amazing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions