We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5dbe785 commit 93fc16aCopy full SHA for 93fc16a
2 files changed
packages/core/src/index.ts
@@ -8,3 +8,4 @@ export { default as SelectPrompt } from './prompts/select';
8
export { default as SelectKeyPrompt } from './prompts/select-key';
9
export { default as TextPrompt } from './prompts/text';
10
export { block } from './utils';
11
+export type { NonEmptyArray } from './utility-types';
packages/prompts/src/index.ts
@@ -4,6 +4,7 @@ import {
4
GroupMultiSelectPrompt,
5
isCancel,
6
MultiSelectPrompt,
7
+ NonEmptyArray,
PasswordPrompt,
SelectKeyPrompt,
SelectPrompt,
@@ -176,7 +177,7 @@ type Option<Value> = Value extends Primitive
176
177
178
export interface SelectOptions<Value> {
179
message: string;
- options: Option<Value>[];
180
+ options: NonEmptyArray<Option<Value>>;
181
initialValue?: Value;
182
maxItems?: number;
183
}
0 commit comments