Skip to content

Commit

Permalink
Fix select option type
Browse files Browse the repository at this point in the history
  • Loading branch information
kevduc committed Aug 24, 2023
1 parent 5dbe785 commit 93fc16a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
3 changes: 2 additions & 1 deletion packages/prompts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
GroupMultiSelectPrompt,
isCancel,
MultiSelectPrompt,
NonEmptyArray,
PasswordPrompt,
SelectKeyPrompt,
SelectPrompt,
Expand Down Expand Up @@ -176,7 +177,7 @@ type Option<Value> = Value extends Primitive

export interface SelectOptions<Value> {
message: string;
options: Option<Value>[];
options: NonEmptyArray<Option<Value>>;
initialValue?: Value;
maxItems?: number;
}
Expand Down

0 comments on commit 93fc16a

Please sign in to comment.