compose
●cart · /core·function
Koa-style middleware composer: each layer wraps the next in registration
order. With compose(a, b)(terminal), execution flows a → b → terminal
and unwinds in reverse.
Signature
function compose(middleware: CartMiddleware[]): CartMiddleware;Parameters
| Name | Type | Description |
|---|---|---|
middleware | CartMiddleware[] |
Returns
A higher-order function that wraps a terminal into a single composed .
Example
Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
MetadataOpen in GitHub ↗
Cart
Full cart state returned by the kernel after every read or mutation. The TExt generic carries providerspecific extensions added by the adapter. Treat this value
CreateCartOpts
Configuration bag passed to . Declares the adapter, optional middleware pipeline, and an optional logger override for the internal event bus.