fix: in node.readline cursorTo allows only x coordinate

Like this we are easily able to move in the current line with
absolute x-axis coordinate.
This commit is contained in:
Augustin Peyrard
2017-06-30 21:11:20 -07:00
parent 53f76e9bf6
commit 370d4fca00
2 changed files with 2 additions and 1 deletions

View File

@@ -1731,7 +1731,7 @@ declare module "readline" {
export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): ReadLine;
export function createInterface(options: ReadLineOptions): ReadLine;
export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void;
export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void;
export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void;
export function clearLine(stream: NodeJS.WritableStream, dir: number): void;
export function clearScreenDown(stream: NodeJS.WritableStream): void;

View File

@@ -1410,6 +1410,7 @@ namespace readline_tests {
let x: number;
let y: number;
readline.cursorTo(stream, x);
readline.cursorTo(stream, x, y);
}