diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index db26c399..3b1f8102 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -8,3 +8,4 @@ export { default as SelectPrompt } from './prompts/select'; export { default as SelectKeyPrompt } from './prompts/select-key'; export { default as TextPrompt } from './prompts/text'; export { block } from './utils'; +export type { NonEmptyArray } from './utility-types'; diff --git a/packages/prompts/src/index.ts b/packages/prompts/src/index.ts index 42451cc8..61f9cb54 100644 --- a/packages/prompts/src/index.ts +++ b/packages/prompts/src/index.ts @@ -4,6 +4,7 @@ import { GroupMultiSelectPrompt, isCancel, MultiSelectPrompt, + NonEmptyArray, PasswordPrompt, SelectKeyPrompt, SelectPrompt, @@ -176,7 +177,7 @@ type Option = Value extends Primitive export interface SelectOptions { message: string; - options: Option[]; + options: NonEmptyArray>; initialValue?: Value; maxItems?: number; }