unjs / consola

🐨 Elegant Console Logger for Node.js and Browser
Other
6.12k stars 175 forks source link

Expose PromptOptions as a public API #301

Closed vorant94 closed 5 months ago

vorant94 commented 5 months ago

Describe the feature

consola.prompt accepts PromptOptions as a second argument. In my case i'd like to define options separately from prompt request to reuse them multiple times. Is there any reason why these interfaces aren't exported despite being a part of public facing API (prompt function signature)?

As a temporary workaround I use satisfies Parameters<typeof consola.prompt>[1], but it is inconvenient comparing with just using PromptOptions and all this type union members right away...

If these types can be exported, I'll be happy to make PR for it

Additional information

pi0 commented 5 months ago

Will be exported in next release.