import { runTasks, type TaskReport } from "avril:task"; const report: TaskReport = await runTasks({ page: { command: ["avril", "run", "render.ts", "a b.md"], files: "content/**", output: ["dist/a.html"], }, feed: { run: async (ctx) => { const root: string = ctx.root; void root; }, dependencies: ["page"], }, all: { dependencies: ["page", "feed"], parallel: true }, }, { target: "all", watch: false }); const ok: boolean = report.ok; const code: number = report.code; const checked: void = report.throwIfFailed(); void ok; void code; void checked; // @ts-expect-error run must be a function. await runTasks({ bad: { run: "true" } }); // @ts-expect-error Task definitions are objects, not strings. await runTasks({ bad: "true" }); // @ts-expect-error files is a string or string array, not a number. await runTasks({ bad: { command: "true", files: 3 } });