Files
bknd/app/src/flows/tasks/presets/LogTask.ts
T
dswbx 4e718a063d cleanup: replace console.log/warn with $console, remove commented-out code
Removed various commented-out code and replaced direct `console.log` and `console.warn` usage across the codebase with `$console` from "core" for standardized logging. Also adjusted linting rules in biome.json to enable warnings for `console.log` usage.
2025-04-10 14:18:48 +02:00

18 lines
448 B
TypeScript

import { Type } from "core/utils";
import { Task } from "../Task";
import { $console } from "core";
export class LogTask extends Task<typeof LogTask.schema> {
type = "log";
static override schema = Type.Object({
delay: Type.Number({ default: 10 }),
});
async execute() {
await new Promise((resolve) => setTimeout(resolve, this.params.delay));
$console.log(`[DONE] LogTask: ${this.name}`);
return true;
}
}