Skip to content

Commit

Permalink
update types for prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
Himyu committed Sep 22, 2024
1 parent 0ced38e commit d880100
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions LPTE.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,15 @@ export interface LPTE {
* Emits a prompt in the console, and waits for a response (or until timeout)
* @param prompt the prompt to send
* @param timeout the amount of ms to wait until rejecting the promise because of timeout
* @returns answer given by user or default
*/
prompt: <T extends Answers = Answers>(prompt: {
prompt: (<T extends Answers = Answers>(prompt: {
questions: QuestionCollection<T>
initialAnswers?: Partial<T> | undefined
}, timeout?: number) => Promise<T>
}) => Promise<T>) | (<T extends ConfirmPrompt = ConfirmPrompt>(prompt: {
questions: QuestionCollection<T>
initialAnswers?: Partial<T> | undefined
}, timeout: number) => Promise<T>)
}

export declare class Registration {
Expand Down

0 comments on commit d880100

Please sign in to comment.