fix(types): fix breaking change in @types/inquirer types
This commit is contained in:
6
package-lock.json
generated
6
package-lock.json
generated
@@ -494,9 +494,9 @@
|
||||
}
|
||||
},
|
||||
"@types/inquirer": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-6.0.3.tgz",
|
||||
"integrity": "sha512-lBsdZScFMaFYYIE3Y6CWX22B9VeY2NerT1kyU2heTc3u/W6a+Om6Au2q0rMzBrzynN0l4QoABhI0cbNdyz6fDg==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-6.5.0.tgz",
|
||||
"integrity": "sha512-rjaYQ9b9y/VFGOpqBEXRavc3jh0a+e6evAbI31tMda8VlPaSy0AZJfXsvmIe3wklc7W6C3zCSfleuMXR7NOyXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/through": "*",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"@bitjson/npm-scripts-info": "^1.0.0",
|
||||
"@bitjson/typedoc": "^0.15.0-0",
|
||||
"@istanbuljs/nyc-config-typescript": "^0.1.3",
|
||||
"@types/inquirer": "^6.0.3",
|
||||
"@types/inquirer": "^6.5.0",
|
||||
"@types/meow": "^5.0.0",
|
||||
"@types/nock": "^10.0.3",
|
||||
"@types/node": "^10",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { prompt, Question } from 'inquirer';
|
||||
import { DistinctQuestion, prompt } from 'inquirer';
|
||||
import { Runner, TypescriptStarterCLIOptions, validateName } from './utils';
|
||||
|
||||
export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
const packageNameQuestion: Question = {
|
||||
const packageNameQuestion: DistinctQuestion = {
|
||||
filter: (answer: string) => answer.trim(),
|
||||
message: '📦 Enter the new package name:',
|
||||
name: 'projectName',
|
||||
@@ -14,7 +14,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
Node = 'node',
|
||||
Library = 'lib'
|
||||
}
|
||||
const projectTypeQuestion: Question = {
|
||||
const projectTypeQuestion: DistinctQuestion = {
|
||||
// tslint:disable-next-line:readonly-array
|
||||
choices: [
|
||||
{ name: 'Node.js application', value: ProjectType.Node },
|
||||
@@ -25,7 +25,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
type: 'list'
|
||||
};
|
||||
|
||||
const packageDescriptionQuestion: Question = {
|
||||
const packageDescriptionQuestion: DistinctQuestion = {
|
||||
filter: (answer: string) => answer.trim(),
|
||||
message: '💬 Enter the package description:',
|
||||
name: 'description',
|
||||
@@ -33,7 +33,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
validate: (answer: string) => answer.length > 0
|
||||
};
|
||||
|
||||
const runnerQuestion: Question = {
|
||||
const runnerQuestion: DistinctQuestion = {
|
||||
// tslint:disable-next-line:readonly-array
|
||||
choices: [
|
||||
{ name: 'npm', value: Runner.Npm },
|
||||
@@ -51,7 +51,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
nodeAndDom = 'both'
|
||||
}
|
||||
|
||||
const typeDefsQuestion: Question = {
|
||||
const typeDefsQuestion: DistinctQuestion = {
|
||||
// tslint:disable-next-line:readonly-array
|
||||
choices: [
|
||||
{
|
||||
@@ -86,7 +86,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
travis = 'travis',
|
||||
vscode = 'vscode'
|
||||
}
|
||||
const extrasQuestion: Question = {
|
||||
const extrasQuestion: DistinctQuestion = {
|
||||
// tslint:disable-next-line:readonly-array
|
||||
choices: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user