Skip to content

Commit

Permalink
types: fix prompt with select type return value type (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
xjccc authored Dec 1, 2023
1 parent 899173f commit 3bd4ae6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ type inferPromptReturnType<T extends PromptOptions> = T extends TextOptions
: T extends ConfirmOptions
? boolean
: T extends SelectOptions
? T["options"][number]
? T["options"][number] extends SelectOption
? T["options"][number]["value"]
: T["options"][number]
: T extends MultiSelectOptions
? T["options"]
: unknown;
Expand Down

0 comments on commit 3bd4ae6

Please sign in to comment.