@@ -4,7 +4,7 @@ import {DistinctQuestion, PromptModule} from 'inquirer';
4
4
import format from './library/format' ;
5
5
import getPrompt from './library/get-prompt' ;
6
6
import settings from './settings' ;
7
- import { InputSetting , Result } from './library/types' ;
7
+ import type { InputSetting , Result } from './library/types' ;
8
8
9
9
import { getHasName , getMaxLength , getRules } from './library/utils' ;
10
10
import InputCustomPrompt from './inquirer/InputCustomPrompt' ;
@@ -15,7 +15,7 @@ import InputCustomPrompt from './inquirer/InputCustomPrompt';
15
15
* @param prompter
16
16
* @return commit message
17
17
*/
18
- export default async function input ( prompter : PromptModule ) : Promise < string > {
18
+ export async function input ( prompter : PromptModule ) : Promise < string > {
19
19
const { rules} = await load ( ) ;
20
20
const parts = [ 'type' , 'scope' , 'subject' , 'body' , 'footer' ] as const ;
21
21
const headerParts = [ 'type' , 'scope' , 'subject' ] ;
@@ -30,14 +30,14 @@ export default async function input(prompter: PromptModule): Promise<string> {
30
30
prompter . registerPrompt ( 'input-custom' , InputCustomPrompt ) ;
31
31
32
32
for ( const input of parts ) {
33
- const inputSettings : InputSetting = settings [ input ] ;
33
+ const inputSetting : InputSetting = settings [ input ] ;
34
34
const inputRules = getRules ( input , rules ) ;
35
35
if ( headerParts . includes ( input ) && maxLength < Infinity ) {
36
- inputSettings . header = {
36
+ inputSetting . header = {
37
37
length : maxLength ,
38
38
} ;
39
39
}
40
- const question = getPrompt ( input , inputRules , inputSettings ) ;
40
+ const question = getPrompt ( input , inputRules , inputSetting ) ;
41
41
if ( question ) {
42
42
questions . push ( question ) ;
43
43
}
0 commit comments