Skip to content

TypeScript API / laikacms/core / LaikaStream / runPromiseResult

Function: runPromiseResult() ​

ts
function runPromiseResult<A, D>(self): Promise<Result<{
  data: readonly A[];
  done: D;
  progress: readonly LaikaProgress[];
  recoverableErrors: readonly LaikaError<ErrorCode, number>[];
}, LaikaError<ErrorCode, number>>>;

Promise-shaped entry point that captures fatal failures as a LaikaResult instead of rejecting.

Type Parameters ​

Type Parameter
A
D extends LaikaDone

Parameters ​

ParameterType
selfLaikaStream<A, D>

Returns ​

Promise<Result<{ data: readonly A[]; done: D; progress: readonly LaikaProgress[]; recoverableErrors: readonly LaikaError<ErrorCode, number>[]; }, LaikaError<ErrorCode, number>>>

Released under the MIT License.