@event-driven-platform/operation-result
v0.1.3
Published
Operation result contracts and factories for the event-driven platform.
Downloads
774
Readme
@event-driven-platform/operation-result
Defines typed outcomes produced by Operation handlers and persisted by the execution pipeline.
Installation
pnpm add @event-driven-platform/operation-resultAPI
OperationResult represents either a successful result or a rejection. The package provides:
OperationResultsfactories for constructing supported outcomes;SuccessfulOperationResult;- committed and rolled-back rejection contracts;
- type guards such as
isSuccessfulOperationResultandisOperationRejection.
Prefer the exported factories and type guards over recreating result shapes manually.
Role
Operation handlers return these outcomes. Runner interprets and persists them as part of execution; an Operation itself does not persist its result.
