[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

chore: use more accurate type to replace any (#369)

Co-authored-by: James Garbutt <43081j@users.noreply.github.com>

authored by

chouchouji
James Garbutt
and committed by
GitHub
(Aug 11, 2025, 10:20 AM +0100) 4c89dd7e e0ecdf59

+9 -4
+5
.changeset/rich-plants-call.md
··· 1 + --- 2 + "@clack/prompts": patch 3 + --- 4 + 5 + chore: use more accurate type to replace any in group select
+4 -4
packages/prompts/src/group-multi-select.ts
··· 23 23 export const groupMultiselect = <Value>(opts: GroupMultiSelectOptions<Value>) => { 24 24 const { selectableGroups = true, groupSpacing = 0 } = opts; 25 25 const opt = ( 26 - option: Option<Value>, 26 + option: Option<Value> & { group: string | boolean }, 27 27 state: 28 28 | 'inactive' 29 29 | 'active' ··· 33 33 | 'group-active-selected' 34 34 | 'submitted' 35 35 | 'cancelled', 36 - options: Option<Value>[] = [] 36 + options: (Option<Value> & { group: string | boolean })[] = [] 37 37 ) => { 38 38 const label = option.label ?? String(option.value); 39 - const isItem = typeof (option as any).group === 'string'; 39 + const isItem = typeof option.group === 'string'; 40 40 const next = isItem && (options[options.indexOf(option) + 1] ?? { group: true }); 41 - const isLast = isItem && (next as any).group === true; 41 + const isLast = isItem && next && next.group === true; 42 42 const prefix = isItem ? (selectableGroups ? `${isLast ? S_BAR_END : S_BAR} ` : ' ') : ''; 43 43 let spacingPrefix = ''; 44 44 if (groupSpacing > 0 && !isItem) {