Interface.prototype.getCursorPos - Node documentation
method Interface.prototype.getCursorPos

Usage in Deno

import { Interface } from "node:readline";
Interface.prototype.getCursorPos(): CursorPos

Returns the real position of the cursor in relation to the input prompt + string. Long input (wrapping) strings, as well as multiple line prompts are included in the calculations.

Return Type