updates checkCode to new framework
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// deno-lint-disable-must-await-calls
|
||||
import { Cursor } from "./cursor.ts";
|
||||
import { ScrollManager } from "./scrollManager.ts";
|
||||
import { colorize } from "./style.ts";
|
||||
import { TerminalBlock, TerminalLayout } from "./TerminalLayout.ts";
|
||||
|
||||
@@ -75,10 +75,14 @@ export function cliAlert(message: string, block?: TerminalBlock) {
|
||||
});
|
||||
}
|
||||
|
||||
export function cliLog(message: string, block?: TerminalBlock) {
|
||||
export function cliLog(
|
||||
message: string | object | Array<unknown>,
|
||||
block?: TerminalBlock,
|
||||
) {
|
||||
if (!block) {
|
||||
console.log(message);
|
||||
} else {
|
||||
if (typeof message === "object") message = Deno.inspect(message);
|
||||
block.setLines(message.split("\n"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user