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