Skip to content

Commit

Permalink
fix: Module '"node:readline"' has no default export.
Browse files Browse the repository at this point in the history
  • Loading branch information
saadfrhan authored Aug 3, 2023
1 parent e7c5bba commit f09ff69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/index.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import readline from 'node:readline';
import { Readline, createInterface } from 'node:readline';
import { CancelablePromise, type Prompt } from '@inquirer/type';
import chalk from 'chalk';
import cliWidth from 'cli-width';
Expand All @@ -11,7 +11,7 @@ export { usePrefix } from './lib/prefix.mjs';
export * from './lib/key.mjs';
export * from './lib/Separator.mjs';

export type InquirerReadline = readline.ReadLine & {
export type InquirerReadline = ReadLine & {
output: MuteStream;
input: NodeJS.ReadableStream;
clearLine: (dir: 0 | 1 | -1) => void; // https://nodejs.org/api/readline.html#rlclearlinedir
Expand Down Expand Up @@ -234,7 +234,7 @@ export function createPrompt<Value, Config extends AsyncPromptConfig>(
const output = new MuteStream();
output.pipe(context?.output ?? process.stdout);

sessionRl = readline.createInterface({
sessionRl = createInterface({
terminal: true,
input,
output,
Expand Down

0 comments on commit f09ff69

Please sign in to comment.