textui/mod.ts

12 lines
309 B
TypeScript
Raw Normal View History

2021-05-19 13:00:52 +00:00
import { AnsiTerminalDisplay } from "./ansi.ts";
import { TextUI } from "./ui.ts";
export { TextUI } from "./ui.ts";
export async function createTextUI(): Promise<TextUI> {
// TODO detect platform
var display = new AnsiTerminalDisplay();
var ui = new TextUI(display);
await ui.init();
return ui;
}