Skip to content

Commit d2344b4

Browse files
committed
refactor: remove type dependency
1 parent ab24ece commit d2344b4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/common/declarations.d.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
IGoogleAnalyticsData,
66
} from "./definitions/google-analytics";
77
import * as child_process from "child_process";
8-
import { Answers } from "prompts";
98

109
// tslint:disable-next-line:interface-name
1110
interface Object {
@@ -830,9 +829,11 @@ interface IPrompterOptions extends IAllowEmpty {
830829
defaultAction?: () => string;
831830
}
832831

833-
interface IPrompterAnswers extends Record<string, any> {}
832+
type IPrompterAnswers<T extends string = string> = { [id in T]: any };
834833

835-
interface IPrompterQuestion<T extends Answers<any> = Answers<any>> {
834+
interface IPrompterQuestion<
835+
T extends IPrompterAnswers<any> = IPrompterAnswers<any>
836+
> {
836837
type?: string;
837838
name?: string;
838839
message?: string;

package-lock.json

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

0 commit comments

Comments
 (0)