TypeScript API / laikacms/compat / runTask
Function: runTask()
ts
function runTask<A>(task, options?): Promise<A>;Run a LaikaTask to completion and return its value as a Promise. Rejects with the fatal LaikaError on failure.
Pass onProgress to receive each LaikaMetadata event (progress + recoverable errors) as the task runs.
This is a Promise-friendly entry point that does not require importing effect at the call site.
Type Parameters
| Type Parameter |
|---|
A |
Parameters
| Parameter | Type |
|---|---|
task | LaikaTask<A> |
options? | CompatOptions |
Returns
Promise<A>