11import inquirer from 'inquirer' ;
22import chalk from 'chalk' ;
33
4- let skipPromptsModified = ( options :any , defaultFolderName :string , notAmongTemplateCollection :any , defaultTemplate :string ) => {
4+ let skipPromptsModified = ( options : any , defaultFolderName : string , notAmongTemplateCollection : any , defaultTemplate : string ) => {
55 if ( notAmongTemplateCollection && ( options . template !== undefined || options . template === undefined ) ) {
66 options . template = defaultTemplate ;
77 }
@@ -17,8 +17,8 @@ let skipPromptsModified = (options:any, defaultFolderName:string, notAmongTempla
1717 return options ;
1818}
1919
20- export const templateMissingOptionPrompt = async ( options :any , folderNameAnswers :any , defaultFolderName :string ) => {
21- const templateQuestions = [ ] ;
20+ export const templateMissingOptionPrompt = async ( options : any , folderNameAnswers : any , defaultFolderName : string ) => {
21+ const templateQuestions : TemplateQuestions [ ] = [ ] ;
2222
2323 const apiTemplate = {
2424 ts : {
@@ -61,18 +61,18 @@ export const templateMissingOptionPrompt = async (options:any, folderNameAnswers
6161 } ) ;
6262 }
6363
64- let templateAnswers :any ;
64+ let templateAnswers : any ;
6565
6666 if ( options . skipPrompts ) {
6767 options = skipPromptsModified ( options , defaultFolderName , notAmongTemplateCollection , defaultTemplate ) ;
68- templateQuestions . template = defaultTemplate ;
68+ ( templateQuestions as any ) . template = defaultTemplate ;
6969 templateAnswers = templateQuestions ;
7070 }
7171
7272 if ( ! options . skipPrompts ) templateAnswers = await inquirer . prompt ( templateQuestions ) ;
7373
7474 // Transform template name/answers back to abbrev name for cli to process it accordingly
75- const transformTemplateName = ( templateOption :any ) => {
75+ const transformTemplateName = ( templateOption : any ) => {
7676 if ( templateOption === defaultTemplate ) templateAnswers . template = apiTemplate . ts . abbrev ;
7777 if ( templateOption === esmTemplate ) templateAnswers . template = apiTemplate . esm . abbrev ;
7878 if ( templateOption === cjsTemplate ) templateAnswers . template = apiTemplate . cjs . abbrev ;
0 commit comments