UNPKG

785 BJavaScriptView Raw
1// @flow
2declare module 'repl' {
3 declare type REPL_MODE_MAGIC = Symbol;
4 declare type REPL_MODE_SLOPPY = Symbol;
5 declare type REPL_MODE_STRICT = Symbol;
6
7 declare class REPLServer extends readline$Interface {
8 context: Object;
9
10 displayPrompt(preserveCursor?: boolean): void;
11 defineCommand(command: string, options: {
12 help?: string;
13 action: (...args: Array<any>) => void
14 }): void;
15 }
16
17 declare function start(options: {
18 eval?: Function;
19 input?: stream$Readable;
20 output?: stream$Writable;
21 prompt?: string;
22 writer?: Function;
23 replMode?: Symbol;
24 terminal?: boolean;
25 completer?: Function;
26 useColors?: boolean;
27 useGlobal?: boolean;
28 ignoreUndefined?: boolean;
29 breakEvalOnSigint?: boolean;
30 }): REPLServer;
31}
32
\No newline at end of file