class NoOpEventEmitter

No-op event emitter for when no events are registered. Provides the same interface but does nothing, avoiding overhead. Uses a more elegant approach with frozen empty object.

Constructors

Static Properties

private
readonly
INSTANCE: NoOpEventEmitter

Static Methods

Get the singleton instance of NoOpEventEmitter

Methods

hasListeners(): boolean

Check if any event handlers are registered (always returns false for no-op)

Usage

import { NoOpEventEmitter } from ".";