12 lines
348 B
TypeScript
12 lines
348 B
TypeScript
import type { Item } from '../fs/Item'
|
|
import type { SimpleStream } from '../utils/SimpleStream'
|
|
import { Program } from './Program'
|
|
|
|
export class Clear extends Program {
|
|
async Exec(_: SimpleStream<string>, stdout: SimpleStream<string>, __: Item, ___: string[]): Promise<number> {
|
|
stdout.emit('\x1b[2J\x1b[H')
|
|
|
|
return 0
|
|
}
|
|
}
|