mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Node.d.ts: Update definitions for module "repl" (#10958)
This commit is contained in:
13
node/node.d.ts
vendored
13
node/node.d.ts
vendored
@@ -970,7 +970,7 @@ declare module "punycode" {
|
||||
|
||||
declare module "repl" {
|
||||
import * as stream from "stream";
|
||||
import * as events from "events";
|
||||
import * as readline from "readline";
|
||||
|
||||
export interface ReplOptions {
|
||||
prompt?: string;
|
||||
@@ -982,8 +982,17 @@ declare module "repl" {
|
||||
useGlobal?: boolean;
|
||||
ignoreUndefined?: boolean;
|
||||
writer?: Function;
|
||||
completer?: Function;
|
||||
replMode?: any;
|
||||
breakEvalOnSigint?: any;
|
||||
}
|
||||
export function start(options: ReplOptions): events.EventEmitter;
|
||||
|
||||
export interface REPLServer extends readline.ReadLine {
|
||||
defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void;
|
||||
displayPrompt(preserveCursor?: boolean): void
|
||||
}
|
||||
|
||||
export function start(options: ReplOptions): REPLServer;
|
||||
}
|
||||
|
||||
declare module "readline" {
|
||||
|
||||
Reference in New Issue
Block a user