Skip to content

Commit d1bc9fa

Browse files
committed
fix(types): fix breaking change in @types/inquirer types
1 parent 5a9412b commit d1bc9fa

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"@bitjson/npm-scripts-info": "^1.0.0",
9191
"@bitjson/typedoc": "^0.15.0-0",
9292
"@istanbuljs/nyc-config-typescript": "^0.1.3",
93-
"@types/inquirer": "^6.0.3",
93+
"@types/inquirer": "^6.5.0",
9494
"@types/meow": "^5.0.0",
9595
"@types/nock": "^10.0.3",
9696
"@types/node": "^10",

src/cli/inquire.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { prompt, Question } from 'inquirer';
1+
import { DistinctQuestion, prompt } from 'inquirer';
22
import { Runner, TypescriptStarterCLIOptions, validateName } from './utils';
33

44
export async function inquire(): Promise<TypescriptStarterCLIOptions> {
5-
const packageNameQuestion: Question = {
5+
const packageNameQuestion: DistinctQuestion = {
66
filter: (answer: string) => answer.trim(),
77
message: '📦 Enter the new package name:',
88
name: 'projectName',
@@ -14,7 +14,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
1414
Node = 'node',
1515
Library = 'lib'
1616
}
17-
const projectTypeQuestion: Question = {
17+
const projectTypeQuestion: DistinctQuestion = {
1818
// tslint:disable-next-line:readonly-array
1919
choices: [
2020
{ name: 'Node.js application', value: ProjectType.Node },
@@ -25,15 +25,15 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
2525
type: 'list'
2626
};
2727

28-
const packageDescriptionQuestion: Question = {
28+
const packageDescriptionQuestion: DistinctQuestion = {
2929
filter: (answer: string) => answer.trim(),
3030
message: '💬 Enter the package description:',
3131
name: 'description',
3232
type: 'input',
3333
validate: (answer: string) => answer.length > 0
3434
};
3535

36-
const runnerQuestion: Question = {
36+
const runnerQuestion: DistinctQuestion = {
3737
// tslint:disable-next-line:readonly-array
3838
choices: [
3939
{ name: 'npm', value: Runner.Npm },
@@ -51,7 +51,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
5151
nodeAndDom = 'both'
5252
}
5353

54-
const typeDefsQuestion: Question = {
54+
const typeDefsQuestion: DistinctQuestion = {
5555
// tslint:disable-next-line:readonly-array
5656
choices: [
5757
{
@@ -86,7 +86,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
8686
travis = 'travis',
8787
vscode = 'vscode'
8888
}
89-
const extrasQuestion: Question = {
89+
const extrasQuestion: DistinctQuestion = {
9090
// tslint:disable-next-line:readonly-array
9191
choices: [
9292
{

0 commit comments

Comments
 (0)