CartEventBus
●cart · /core·interface
In-process pub/sub channel through which the kernel broadcasts cart
lifecycle events. Returned by ; passed to
internally and exposed on the returned
via its on method.
Properties
PROPTYPEDESCRIPTION
emit
unknown
on
unknown
Example
const bus = createEventBus({ logger: consoleLogger });
const off = bus.on('cart.updated', (e) => syncStore(e.cart));
// later:
off(); // unsubscribeRelated
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
MetadataOpen in GitHub ↗
CartError
Base class for every cartcore domain error. Consumers match on error.name rather than instanceof because cartcore errors can cross package boundaries (SSR → cli
CartEventHandler
Callback signature for a subscriber to a specific variant. The generic narrows the event parameter to exactly the variant identified by E, so handlers receive s