MCPcopy Index your code
hub / github.com/changesets/changesets / askList

Function askList

packages/cli/src/utils/cli-utilities.ts:126–146  ·  view source on GitHub ↗
(
  message: string,
  choices: Choice[]
)

Source from the content-addressed store, hash-verified

124}
125
126async function askList<Choice extends string>(
127 message: string,
128 choices: Choice[]
129): Promise<Choice> {
130 const name = `List-${serialId()}`;
131
132 return prompt([
133 {
134 choices,
135 message,
136 name,
137 prefix,
138 type: "select",
139 onCancel: cancelFlow,
140 } as ArrayPromptOptions,
141 ])
142 .then((responses: any) => responses[name])
143 .catch((err: unknown) => {
144 error(err);
145 });
146}
147
148export {
149 askCheckboxPlus,

Callers

nothing calls this directly

Calls 1

errorFunction · 0.90

Tested by

no test coverage detected