Skip to content

Commit

Permalink
fix(prompt): adopt prompts to work with enabled ts option useDefineFo…
Browse files Browse the repository at this point in the history
…rClassFields (#162)
  • Loading branch information
c4spar committed Mar 15, 2021
1 parent 933c3ed commit ac6ce0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions prompt/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,7 @@ export function inject(values: Record<string, any>): void {
class PromptList {
private result: Record<string, any> = {};
private index: number = -1;
private names: string[] = this.prompts.map((prompt) => prompt.name);
private names: Array<string>;
private isInBeforeHook = false;

private get prompt(): PromptOptions<string, any, any> {
Expand All @@ -2018,7 +2018,9 @@ class PromptList {
public constructor(
private prompts: PromptOptions<string, any, any>[],
private options?: PromptListOptions<any>,
) {}
) {
this.names = this.prompts.map((prompt) => prompt.name);
}

public async run(
name?: string | number | true,
Expand Down

0 comments on commit ac6ce0e

Please sign in to comment.