diff --git a/packages/prompts/src/index.ts b/packages/prompts/src/index.ts index e50ecf3a..fad0f628 100644 --- a/packages/prompts/src/index.ts +++ b/packages/prompts/src/index.ts @@ -844,16 +844,12 @@ export const spinner = ({ indicator = 'dots' }: SpinnerOptions = {}) => { }; }; -export type PromptGroupAwaitedReturn = { - [P in keyof T]: Exclude, symbol>; -}; - export interface PromptGroupOptions { /** * Control how the group can be canceled * if one of the prompts is canceled. */ - onCancel?: (opts: { results: Prettify>> }) => void; + onCancel?: (opts: { results: Prettify> }) => void; } type Prettify = { @@ -862,7 +858,7 @@ type Prettify = { export type PromptGroup = { [P in keyof T]: (opts: { - results: Prettify>>>; + results: Record; }) => undefined | Promise; }; @@ -873,7 +869,7 @@ export type PromptGroup = { export const group = async ( prompts: PromptGroup, opts?: PromptGroupOptions -): Promise>> => { +): Promise> => { const results = {} as any; const promptNames = Object.keys(prompts);