11import inquirer from 'inquirer' ;
22import chalk from 'chalk' ;
3- import { TemplateQuestions } from '../interfaces' ;
3+ import { IFoldernameAnswers , Ioptions , ItemplateOptions , TemplateQuestions } from '../interfaces' ;
44
5- let skipPromptsModified = ( options : any , defaultFolderName : string , notAmongTemplateCollection : any , defaultTemplate : string ) => {
5+ let skipPromptsModified = ( options : Ioptions , defaultFolderName : string , notAmongTemplateCollection : boolean , defaultTemplate : ItemplateOptions ) => {
66 if ( notAmongTemplateCollection && ( options . template !== undefined || options . template === undefined ) ) {
77 options . template = defaultTemplate ;
88 }
@@ -18,7 +18,7 @@ let skipPromptsModified = (options: any, defaultFolderName: string, notAmongTemp
1818 return options ;
1919}
2020
21- export const templateMissingOptionPrompt = async ( options : any , folderNameAnswers : any , defaultFolderName : string ) => {
21+ export const templateMissingOptionPrompt = async ( options : Ioptions , folderNameAnswers : IFoldernameAnswers , defaultFolderName : string ) => {
2222 const templateQuestions : TemplateQuestions [ ] = [ ] ;
2323
2424 const apiTemplate = {
@@ -73,7 +73,7 @@ export const templateMissingOptionPrompt = async (options: any, folderNameAnswer
7373 if ( ! options . skipPrompts ) templateAnswers = await inquirer . prompt ( templateQuestions ) ;
7474
7575 // Transform template name/answers back to abbrev name for cli to process it accordingly
76- const transformTemplateName = ( templateOption : any ) => {
76+ const transformTemplateName = ( templateOption : string ) => {
7777 if ( templateOption === defaultTemplate ) templateAnswers . template = apiTemplate . ts . abbrev ;
7878 if ( templateOption === esmTemplate ) templateAnswers . template = apiTemplate . esm . abbrev ;
7979 if ( templateOption === cjsTemplate ) templateAnswers . template = apiTemplate . cjs . abbrev ;
0 commit comments