Skip to content

Commit

Permalink
chore: use empty string as default prompt values to address typing is…
Browse files Browse the repository at this point in the history
…sues with yeoman
  • Loading branch information
leon19 committed Oct 11, 2024
1 parent abc08f4 commit f34e026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generators/app/prompter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type Generator from 'yeoman-generator';
export class Prompter {
constructor(private prompt: Generator['prompt']) {}

async askProjectName(defaultName?: string): Promise<string> {
async askProjectName(defaultName = ''): Promise<string> {
const { name } = await this.prompt({
default: defaultName,
message: 'Your project name',
Expand All @@ -28,7 +28,7 @@ export class Prompter {
return isString(description) ? description.trim() : '';
}

async askAuthorName(defaultAuthorName?: string): Promise<string> {
async askAuthorName(defaultAuthorName = ''): Promise<string> {
const { authorName } = await this.prompt({
default: defaultAuthorName,
message: 'Author name',
Expand All @@ -39,7 +39,7 @@ export class Prompter {
return isString(authorName) ? authorName.trim() : '';
}

async askAuthorEmail(defaultAuthorEmail?: string): Promise<string> {
async askAuthorEmail(defaultAuthorEmail = ''): Promise<string> {
const { authorEmail } = await this.prompt({
default: defaultAuthorEmail,
message: 'Author email',
Expand Down

0 comments on commit f34e026

Please sign in to comment.