ExperimentalA key of NetworkEvents.
Optionaldocumentation: SingleNotificationDocumentationOptional notification documentation. Carries
notification['x-experimental']: true to mark the event as experimental.
Optionaloptions: { bufferStrategy?: NetworkEventBufferStrategy<NetworkEvents[EventType]> }OptionalbufferStrategy?: NetworkEventBufferStrategy<NetworkEvents[EventType]>How to buffer pre-registration emits. Defaults to 'queue'.
emit (usable immediately), registeredEmitter (resolves to the underlying emitter, or
rejects if registration failed), and dispose.
Creates an event emitter that works properly over the network.
Unique network event type for coordinating between connections
Event emitter whose event works between connections
8 June 2026. Use createNetworkEventEmitterAsync. Events created via the sync API
are not centrally registered and do not appear in the OpenRPC document. The async version
restricts central registration of an event name to a single source (unless the event is
declared in MultiSourceNetworkEvents, in which case it accepts multiple registrants by
design). Note this restricts central registration, not emission: the registry does not block
emits today, but it warns when an event is announced without a matching registration or from a
process that did not register it. That tolerance is transitional — announcing an unregistered
or cross-process single-source event is deprecated and is expected to become an error (with the
registry gating emission) in a future release, so treat the warning as something to fix, not as
the permanent behavior.
WARNING: You can only create a network event emitter once per eventType to prevent hijacked event emitters.
Create a network event emitter that participates in central registration. Every centrally
registered event appears in the OpenRPC document; providing documentation fills in its summary,
params, and x-experimental flag, otherwise it is surfaced with placeholder docs.
If the event name is in MultiSourceNetworkEvents, the central registry uses multi-source semantics: multiple processes may register the same name (each process registers once); all corresponding emitters are valid sources.
Otherwise the registry uses single-source semantics: only one process may register a given name; subsequent registrations from any process are rejected.
Intra-process duplicate registration is always rejected regardless of the event's domain.
See MultiSourceNetworkEvents for multi-source vs single-source semantics.
The name of the event to register. Must be a key of NetworkEvents.
Optionaldocumentation: SingleNotificationDocumentationOptional notification documentation. Carries
notification['x-experimental']: true to mark the event as experimental.
Subscribe to a typed network event. The payload type is inferred from the event's declaration in NetworkEvents.
The name of the event to subscribe to. Must be a key of NetworkEvents.
Event for the event type that runs the callback provided when the event is emitted
Subscribe to a network event with an explicit payload type.
Unique network event type for coordinating between connections
Event for the event type that runs the callback provided when the event is emitted
8 June 2026. Use the typed signature: declare the event in NetworkEvents and
call getNetworkEvent('your.event.name') without an explicit type parameter.
Synchronously create a buffered emitter for a single-source network event. Use this for events that may be emitted before the network emitter finishes registering — e.g. from a UI handler or a command that can fire during extension activation, where the eager createNetworkEventEmitterAsync would leave a module-level emitter
undefined.The returned
emitis usable immediately. Emits made before central registration completes are buffered peroptions.bufferStrategyand flushed once registration succeeds; after thatemitpasses straight through. If registration fails, buffered events are dropped (with a warning) andregisteredEmitterrejects so the caller can respond.