import inquirer from "inquirer" ; export function askChoice < T > ( question ) { if ( question . hidePrompt ) { return question . defaultAnswer ; } return inquirer . prompt ( [ { name : "answer" , type : "list" , message : question . message , choices : question . choices , } , ] ) . then ( ( answer ) => answer . answer as T ) ; }