MCPcopy Index your code
hub / github.com/angular/angular-cli / askChoices

Function askChoices

packages/angular/cli/src/utilities/prompt.ts:55–74  ·  view source on GitHub ↗
(
  message: string,
  choices: { name: string; value: string; checked?: boolean }[],
  noTTYResponse: string[] | null,
)

Source from the content-addressed store, hash-verified

53}
54
55export async function askChoices(
56 message: string,
57 choices: { name: string; value: string; checked?: boolean }[],
58 noTTYResponse: string[] | null,
59): Promise<string[] | null> {
60 if (!isTTY()) {
61 return noTTYResponse;
62 }
63
64 const { checkbox } = await import('@inquirer/prompts');
65 const answers = await checkbox({
66 message,
67 choices,
68 theme: {
69 prefix: '',
70 },
71 });
72
73 return answers;
74}

Callers 1

Calls 1

isTTYFunction · 0.90

Tested by

no test coverage detected