[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: add prettify type helper

Bruno Rocha (Mar 9, 2023, 11:48 AM -0300) ac7d1e1d f44c1042

+8 -4
+8 -4
packages/prompts/src/index.ts
··· 654 654 655 655 export interface PromptGroupOptions<T> { 656 656 /** 657 - * Control how the group can be canceld 658 - * if one of the prompts is canceld. 657 + * Control how the group can be canceled 658 + * if one of the prompts is canceled. 659 659 */ 660 660 onCancel?: (opts: { results: Partial<PromptGroupAwaitedReturn<T>> }) => void; 661 661 } 662 662 663 + type Prettify<T> = { 664 + [P in keyof T]: T[P]; 665 + } & {}; 666 + 663 667 export type PromptGroup<T> = { 664 668 [P in keyof T]: (opts: { 665 - results: Partial<PromptGroupAwaitedReturn<T>>; 669 + results: Prettify<Partial<PromptGroupAwaitedReturn<T>>>; 666 670 }) => void | Promise<T[P] | void>; 667 671 }; 668 672 ··· 673 677 export const group = async <T>( 674 678 prompts: PromptGroup<T>, 675 679 opts?: PromptGroupOptions<T> 676 - ): Promise<PromptGroupAwaitedReturn<T>> => { 680 + ): Promise<Prettify<PromptGroupAwaitedReturn<T>>> => { 677 681 const results = {} as any; 678 682 const promptNames = Object.keys(prompts); 679 683