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

Usage in Deno

```typescript import { clearLine } from "node:node__readline.d.ts"; ```
clearLine(
stream: WritableStream,
dir: Direction,
callback?: () => void,
): boolean
The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream in a specified direction identified by `dir`.

Parameters

stream: WritableStream
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`.