(
mode: OutputMode,
opts: {
clack?: StyledClack;
verboseTarget?: { write: ((msg: string) => void) | undefined };
} = {},
)
| 8 | import type { UI } from "./types.js"; |
| 9 | |
| 10 | export function createUI( |
| 11 | mode: OutputMode, |
| 12 | opts: { |
| 13 | clack?: StyledClack; |
| 14 | verboseTarget?: { write: ((msg: string) => void) | undefined }; |
| 15 | } = {}, |
| 16 | ): UI { |
| 17 | const clack = opts.clack ?? createStyledClack(); |
| 18 | |
| 19 | return { |
| 20 | mode, |
| 21 | ...pickRenderers(mode, clack, opts.verboseTarget), |
| 22 | confirm: createConfirm({ mode, clack }), |
| 23 | password: createPassword({ mode, clack }), |
| 24 | json: createJson(), |
| 25 | }; |
| 26 | } |
no test coverage detected