typescript: prompt could return Symbol('clack:cancel')
Jannchie opened this issue · 1 comments
Jannchie commented
Environment
v3.2.3
Reproduction
const res = await consola.prompt('Enter somethings', {type: 'text'})
When executing the above code, if you press ctrl + c to cancel, the value of res
is Symbol('clack:cancel')
Describe the bug
However, res
is annotated as string.
I'm not sure if we should set the return value type to string | symbol
or make it output an empty string or undefined
.
Is this an upstream issue (in @clack/core
)?
Additional context
No response
Logs
No response
samuelstroschein commented
See #251 (comment)