Skip to content

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 ​

ParameterType
selfLaikaTask<A>

Returns ​

Promise<Result<A, LaikaError<ErrorCode, number>>>

Released under the MIT License.