Environment
- OS: Linux
- Node Version: 16.20
- Package:
@clack/prompts - Package Version: v0.6.3
Describe the bug
Just a TS error, nothing is functionally wrong.
When using select within group, and initialValue is not provided, the type for value in the options is mistakenly void.
To Reproduce
Minimal Repro
import{group,select}from'@clack/prompts';(asyncfunctioncreate(){const{ language }=awaitgroup({language: ()=>select({message: 'Project langauge:',// uncomment following line and the error disappears//initialValue: 'js',options: [{value: 'js',label: 'JavaScript'}// Type 'string' is not assignable to type 'void'. (tsserver 2322)],}),});})();Steps to reproduce the behavior:
- Follow link
- Observe error
- Uncomment the
initialValue line - Observe error disappearing
Expected behavior
Shouldn't be a type error, AFAIK initialValue does not need to be present, as Clack works perfectly fine without.
Environment
@clack/promptsDescribe the bug
Just a TS error, nothing is functionally wrong.
When using
selectwithingroup, andinitialValueis not provided, the type forvaluein the options is mistakenlyvoid.To Reproduce
Minimal Repro
Steps to reproduce the behavior:
initialValuelineExpected behavior
Shouldn't be a type error, AFAIK
initialValuedoes not need to be present, as Clack works perfectly fine without.