Skip to main content
moveCursor - node__readline.d.ts - Node documentation
function moveCursor

Usage in Deno

```typescript import { moveCursor } from "node:node__readline.d.ts"; ```
moveCursor(
stream: WritableStream,
dx: number,
dy: number,
callback?: () => void,
): boolean
The `readline.moveCursor()` method moves the cursor _relative_ to its current position in a given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.

Parameters

stream: WritableStream
dx: number
dy: number
optional
callback: () => void
Invoked once the operation completes.

Return Type

boolean
`false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.