Skip to content

Commit c4704e9

Browse files
tylerjusflyIfycode
authored andcommitted
fix: fixed types any on foldername
1 parent d5068ee commit c4704e9

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/interfaces.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,11 @@ export interface Ioptions {
2424

2525
export interface IFoldernameAnswers {
2626
folderName:string
27+
}
28+
29+
export interface IFolderQuestions {
30+
type: string;
31+
name: string;
32+
message: string;
33+
default?:string | null
2734
}

src/prompts/foldername.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import inquirer from 'inquirer';
22
import chalk from 'chalk';
33
import fs from 'fs';
4+
import { IFolderQuestions, Ioptions } from '../interfaces';
45

5-
export const folderNameMissingOptionPrompt = async (options: any) => {
6+
export const folderNameMissingOptionPrompt = async (options: Ioptions) => {
67
let defaultFolderName = 'nm-kit';
7-
const folderQuestions: any[] = [];
8+
const folderQuestions: IFolderQuestions[] = [];
89

910
let questionPush = (msgString: string, folder: string | null) => {
1011
folderQuestions.push({
@@ -114,7 +115,7 @@ export const folderNameMissingOptionPrompt = async (options: any) => {
114115
});
115116

116117
if (matchFolderNameArg) {
117-
options.folderName = incrementFolderName();
118+
options.folderName = incrementFolderName() as unknown as string;
118119
}
119120
}
120121

0 commit comments

Comments
 (0)