UNPKG

tsro

Version:

TypeScript Remove Orphaned (tsro) is a CLI utility and library for TypeScript projects that detects and removes files containing invalid imports — imports that refer to nonexistent entities or nonexistent modules.

13 lines (12 loc) 367 B
import { stdout } from "node:process"; export const createNodeJsLogger = () => "isTTY" in stdout && stdout.isTTY ? { write: stdout.write.bind(stdout), clearLine: stdout.clearLine.bind(stdout), cursorTo: stdout.cursorTo.bind(stdout), isTTY: true, } : { write: stdout.write.bind(stdout), isTTY: false, };