@@ -4,7 +4,7 @@ import {DistinctQuestion, PromptModule} from 'inquirer';
44import format from './library/format' ;
55import getPrompt from './library/get-prompt' ;
66import settings from './settings' ;
7- import { InputSetting , Result } from './library/types' ;
7+ import type { InputSetting , Result } from './library/types' ;
88
99import { getHasName , getMaxLength , getRules } from './library/utils' ;
1010import InputCustomPrompt from './inquirer/InputCustomPrompt' ;
@@ -15,7 +15,7 @@ import InputCustomPrompt from './inquirer/InputCustomPrompt';
1515 * @param prompter
1616 * @return commit message
1717 */
18- export default async function input ( prompter : PromptModule ) : Promise < string > {
18+ export async function input ( prompter : PromptModule ) : Promise < string > {
1919 const { rules} = await load ( ) ;
2020 const parts = [ 'type' , 'scope' , 'subject' , 'body' , 'footer' ] as const ;
2121 const headerParts = [ 'type' , 'scope' , 'subject' ] ;
@@ -30,14 +30,14 @@ export default async function input(prompter: PromptModule): Promise<string> {
3030 prompter . registerPrompt ( 'input-custom' , InputCustomPrompt ) ;
3131
3232 for ( const input of parts ) {
33- const inputSettings : InputSetting = settings [ input ] ;
33+ const inputSetting : InputSetting = settings [ input ] ;
3434 const inputRules = getRules ( input , rules ) ;
3535 if ( headerParts . includes ( input ) && maxLength < Infinity ) {
36- inputSettings . header = {
36+ inputSetting . header = {
3737 length : maxLength ,
3838 } ;
3939 }
40- const question = getPrompt ( input , inputRules , inputSettings ) ;
40+ const question = getPrompt ( input , inputRules , inputSetting ) ;
4141 if ( question ) {
4242 questions . push ( question ) ;
4343 }
0 commit comments