Skip to content

Commit

Permalink
Try a namespace for Prompts types
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Dec 13, 2024
1 parent 0a494cb commit b40b898
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions registry/lib/prompts.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import confirm from '@inquirer/confirm'
import input from '@inquirer/input'
import password from '@inquirer/password'
import search from '@inquirer/search'
import select, { Separator } from '@inquirer/select'
import inquirerConfirm from '@inquirer/confirm'
import inquirerInput from '@inquirer/input'
import inquirerPassword from '@inquirer/password'
import inquirerSearch from '@inquirer/search'
import inquirerSelect, { Separator as InquirerSelector } from '@inquirer/select'

declare global {
type Separator = InstanceType<typeof Separator>
declare namespace Prompts {
export const confirm: typeof inquirerConfirm
export const input: typeof inquirerInput
export const password: typeof inquirerPassword
export const search: typeof inquirerSearch
export const select: typeof inquirerSelect
export const Separator: typeof InquirerSelector
export type Separator = typeof InquirerSelector
}
declare const promptsModule: {
Separator: typeof Separator
confirm: typeof confirm
input: typeof input
password: typeof password
search: typeof search
select: typeof select
}
export = promptsModule
export = Prompts

0 comments on commit b40b898

Please sign in to comment.