Skip to content

Clear all text from a terminal using TypeScript

Advertisements
import * as process from 'process';

// Clear all text from the terminal window.
function clearTerminal(): void {
    process.stdout.write("\x1Bc")
}
See also  TypeScript code snippet - How to pass data between requests in api?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.