TypeScript API / laikacms/core / LaikaTask / runPromiseResult
Function: runPromiseResult()
ts
function runPromiseResult<A>(self): Promise<Result<A, LaikaError<ErrorCode, number>>>;Promise-shaped entry point that captures fatal failures as a LaikaResult instead of rejecting. Useful when the caller wants total recovery without try/catch.
Type Parameters
| Type Parameter |
|---|
A |
Parameters
| Parameter | Type |
|---|---|
self | LaikaTask<A> |
Returns
Promise<Result<A, LaikaError<ErrorCode, number>>>