abstract class Plugin<
TPluginEvents extends SEEventMapLike<TPluginEvents> = SENoEvents
>
extends StrictEventEmitter<TPluginEvents>
implements Initializeable, HmrAwareabstract class Plugin<
TPluginEvents extends SEEventMapLike<TPluginEvents> = SENoEvents
>
extends StrictEventEmitter<TPluginEvents>
implements Initializeable, HmrAwareMember visibility
Filter class members by access level.
Showing members with Protected visibility and higher.
TPluginEvents
TPluginEvents extends SEEventMapLike<TPluginEvents> = SENoEventsTPluginEvents extends SEEventMapLike<TPluginEvents> = SENoEventsaddListener()
Alias of onon for compatibility with Node.js EventEmitter APIs.
eventThe event name to attach to
listenerCallback operating on the typed argument tuple for the event
Inherited from:StrictEventEmitter
emit()
Emits an event with the strictly typed argument tuple for the event name.
eventThe event name to emit
argsTuple payload for the event
Inherited from:StrictEventEmitter
eventNamesTyped()
Returns the list of event names known to the emitter with the mapped key type.
eventNamesTyped(): SEEventKey<TEvents>[]eventNamesTyped(): SEEventKey<TEvents>[]Inherited from:StrictEventEmitter
listenerCountTyped()
Counts listeners for an event without widening the return type of listenerCountlistenerCount.
eventThe event name to inspect
Inherited from:StrictEventEmitter
listeners()
Retrieves the listener list for a given event with the correct tuple signature.
eventThe event name to inspect
Inherited from:StrictEventEmitter
off()
Removes a previously registered listener for the given event.
eventThe event name whose listener should be removed
listenerCallback originally registered for the event
Inherited from:StrictEventEmitter
on()
Registers a persistent listener with tuple-safe arguments for the given event.
eventThe event name to attach to
listenerCallback operating on the typed argument tuple for the event
Inherited from:StrictEventEmitter
once()
Registers a one time listener that is removed after the first invocation.
eventThe event name to attach to
listenerCallback operating on the typed argument tuple for the event
Inherited from:StrictEventEmitter
public async onHmr(_event: HmrUpdateEvent): Promise<void>public async onHmr(_event: HmrUpdateEvent): Promise<void>_eventThe HMR update event Override this method to handle HMR updates
Alias of offoff for compatibility with Node.js EventEmitter APIs.
eventThe event name whose listener should be removed
listenerCallback originally registered for the event
Inherited from:StrictEventEmitter
waitFor()
Waits for an event to be emitted, resolving with the listener arguments tuple once triggered. Supports optional abort signals and timeouts for cancellation semantics.
async waitFor<TEventKey>(
event: TEventKey,
opts?: { signal?: AbortSignal; timeoutMs?: number }
): Promise<TEvents[TEventKey]>async waitFor<TEventKey>(
event: TEventKey,
opts?: { signal?: AbortSignal; timeoutMs?: number }
): Promise<TEvents[TEventKey]>eventThe event name to wait for
optsOptional abort signal or timeout in milliseconds
Inherited from:StrictEventEmitter