Bus
Manages application subscribers and event handling
Provides a centralized system for registering and executing custom subscribers throughout the application lifecycle. Bus subscribers are loaded from configured directories and can be triggered programmatically or by framework events. Accessed via core.buscore.bus, not constructed directly.
class Bus extends Plugin<SubscriptionTuples>class Bus extends Plugin<SubscriptionTuples>Member visibility
Filter class members by access level.
Publishes an event to its subscribers and native listeners.
Fire-and-forget, so subscriber handlers run asynchronously and this returns before they complete, and callers must not assume side effects have landed. Errors thrown by a subscriber are caught and logged, never surfaced here. A 'once''once' subscriber is marked as executed when it starts (even if it throws), so it never runs twice.
public publish<KeyOfSubscribers>(
event: KeyOfSubscribers,
data: AllSubscriptions[KeyOfSubscribers]
): booleanpublic publish<KeyOfSubscribers>(
event: KeyOfSubscribers,
data: AllSubscriptions[KeyOfSubscribers]
): booleaneventThe subscription key to publish
dataPayload passed to each subscriber
registerCriticalFiles()
Registers critical file patterns that should trigger a full restart when changed in Dev HMR.