Skip to content

API Reference


Function: task()

task(description): TaskBuilder<Task, { }, TaskCtx>

Defined in: builders/task.ts:533

Creates a new task builder.

Parameters

ParameterTypeDefault valueDescription
descriptionstring""A brief description of what the task does.

Returns

TaskBuilder<Task, { }, TaskCtx>

A TaskBuilder to configure the task.

Example

typescript
import { task } from "@ice.ts/runner"

export const myTask = task("My useful task")
  .params({ name: { type: "string" } })
  .run(({ args }) => console.log(args.name))
  .make()