mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
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:
2
types/node/index.d.ts
vendored
2
types/node/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -1410,6 +1410,7 @@ namespace readline_tests {
|
||||
let x: number;
|
||||
let y: number;
|
||||
|
||||
readline.cursorTo(stream, x);
|
||||
readline.cursorTo(stream, x, y);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user