diff --git a/packages/core/src/prompts/multi-select.ts b/packages/core/src/prompts/multi-select.ts index 4e6eb72..f93ea4c 100644 --- a/packages/core/src/prompts/multi-select.ts +++ b/packages/core/src/prompts/multi-select.ts @@ -1,13 +1,14 @@ +import type { NonEmptyArray } from '../utility-types'; import Prompt, { type PromptOptions } from './prompt'; interface MultiSelectOptions extends PromptOptions> { - options: T[]; + options: MultiSelectPrompt['options']; initialValues?: T['value'][]; required?: boolean; cursorAt?: T['value']; } export default class MultiSelectPrompt extends Prompt { - options: T[]; + options: NonEmptyArray; cursor = 0; private get _value() { diff --git a/packages/prompts/src/index.ts b/packages/prompts/src/index.ts index c851c2c..cc7aba5 100644 --- a/packages/prompts/src/index.ts +++ b/packages/prompts/src/index.ts @@ -314,7 +314,7 @@ export const selectKey = (opts: SelectOptions) => { export interface MultiSelectOptions { message: string; - options: Option[]; + options: NonEmptyArray>; initialValues?: Value[]; maxItems?: number; required?: boolean;