The value to return when this item is selected
Label, description, icon, and other display options
A quick pick item carrying value
const items = [
toPickItem('feature', { label: 'Feature', description: 'New feature' }),
toPickItem('fix', { label: 'Bug Fix', description: 'Fix a bug', icon: 'bug' }),
];
const selected = await pickOne(items);
if (selected) {
console.log(selected.value); // 'feature' | 'fix', not a label string
}
Builds a type-safe PickItem from a value and its display options. Keeps the value your code cares about separate from the label string the user sees, so callers never need to parse a label back into data.