1
- import { prompt , Question } from 'inquirer' ;
1
+ import { DistinctQuestion , prompt } from 'inquirer' ;
2
2
import { Runner , TypescriptStarterCLIOptions , validateName } from './utils' ;
3
3
4
4
export async function inquire ( ) : Promise < TypescriptStarterCLIOptions > {
5
- const packageNameQuestion : Question = {
5
+ const packageNameQuestion : DistinctQuestion = {
6
6
filter : ( answer : string ) => answer . trim ( ) ,
7
7
message : '📦 Enter the new package name:' ,
8
8
name : 'projectName' ,
@@ -14,7 +14,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
14
14
Node = 'node' ,
15
15
Library = 'lib'
16
16
}
17
- const projectTypeQuestion : Question = {
17
+ const projectTypeQuestion : DistinctQuestion = {
18
18
// tslint:disable-next-line:readonly-array
19
19
choices : [
20
20
{ name : 'Node.js application' , value : ProjectType . Node } ,
@@ -25,15 +25,15 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
25
25
type : 'list'
26
26
} ;
27
27
28
- const packageDescriptionQuestion : Question = {
28
+ const packageDescriptionQuestion : DistinctQuestion = {
29
29
filter : ( answer : string ) => answer . trim ( ) ,
30
30
message : '💬 Enter the package description:' ,
31
31
name : 'description' ,
32
32
type : 'input' ,
33
33
validate : ( answer : string ) => answer . length > 0
34
34
} ;
35
35
36
- const runnerQuestion : Question = {
36
+ const runnerQuestion : DistinctQuestion = {
37
37
// tslint:disable-next-line:readonly-array
38
38
choices : [
39
39
{ name : 'npm' , value : Runner . Npm } ,
@@ -51,7 +51,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
51
51
nodeAndDom = 'both'
52
52
}
53
53
54
- const typeDefsQuestion : Question = {
54
+ const typeDefsQuestion : DistinctQuestion = {
55
55
// tslint:disable-next-line:readonly-array
56
56
choices : [
57
57
{
@@ -86,7 +86,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
86
86
travis = 'travis' ,
87
87
vscode = 'vscode'
88
88
}
89
- const extrasQuestion : Question = {
89
+ const extrasQuestion : DistinctQuestion = {
90
90
// tslint:disable-next-line:readonly-array
91
91
choices : [
92
92
{
0 commit comments