type alias Recipe

The zero-parameter shape: return the value (or a promise of it) and that settles the Task. Declared with no parameters both because that is what it receives and because it is what lets TypeScript tell a recipe from an Executor — a lambda naming even one parameter can then only be the executor, so resolve gets contextually typed instead of any. A recipe that needs the AbortSignal takes the executor shape.

Type Parameters

Definition

() => T | PromiseLike<T>

Usage

import { type Recipe } from "lib/task/task.ts";