···11+---
22+"@clack/prompts": patch
33+---
44+55+Exports the `Option` type and improves JSDocannotations
+37-3
packages/prompts/src/index.ts
···209209210210type Primitive = Readonly<string | boolean | number>;
211211212212-type Option<Value> = Value extends Primitive
213213- ? { value: Value; label?: string; hint?: string }
214214- : { value: Value; label: string; hint?: string };
212212+export type Option<Value> = Value extends Primitive
213213+ ? {
214214+ /**
215215+ * Internal data for this option.
216216+ */
217217+ value: Value;
218218+ /**
219219+ * The optional, user-facing text for this option.
220220+ *
221221+ * By default, the `value` is converted to a string.
222222+ */
223223+ label?: string;
224224+ /**
225225+ * An optional hint to display to the user when
226226+ * this option might be selected.
227227+ *
228228+ * By default, no `hint` is displayed.
229229+ */
230230+ hint?: string;
231231+ }
232232+ : {
233233+ /**
234234+ * Internal data for this option.
235235+ */
236236+ value: Value;
237237+ /**
238238+ * Required. The user-facing text for this option.
239239+ */
240240+ label: string;
241241+ /**
242242+ * An optional hint to display to the user when
243243+ * this option might be selected.
244244+ *
245245+ * By default, no `hint` is displayed.
246246+ */
247247+ hint?: string;
248248+ };
215249216250export interface SelectOptions<Value> {
217251 message: string;