MCPcopy
hub / github.com/rollup/rollup / AwaitingEventEmitter

Interface AwaitingEventEmitter

src/rollup/types.d.ts:1079–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077> = (...parameters: Parameters<T[K]>) => void | Promise<void>;
1078
1079export interface AwaitingEventEmitter<T extends Record<string, (...parameters: any) => any>> {
1080 close(): Promise<void>;
1081 emit<K extends keyof T>(event: K, ...parameters: Parameters<T[K]>): Promise<unknown>;
1082 /**
1083 * Removes an event listener.
1084 */
1085 off<K extends keyof T>(event: K, listener: AwaitedEventListener<T, K>): this;
1086 /**
1087 * Registers an event listener that will be awaited before Rollup continues.
1088 * All listeners will be awaited in parallel while rejections are tracked via
1089 * Promise.all.
1090 */
1091 on<K extends keyof T>(event: K, listener: AwaitedEventListener<T, K>): this;
1092 /**
1093 * Registers an event listener that will be awaited before Rollup continues.
1094 * All listeners will be awaited in parallel while rejections are tracked via
1095 * Promise.all.
1096 * Listeners are removed automatically when removeListenersForCurrentRun is
1097 * called, which happens automatically after each run.
1098 */
1099 onCurrentRun<K extends keyof T>(
1100 event: K,
1101 listener: (...parameters: Parameters<T[K]>) => Promise<ReturnType<T[K]>>
1102 ): this;
1103 removeAllListeners(): this;
1104 removeListenersForCurrentRun(): this;
1105}
1106
1107export type RollupWatcherEvent =
1108 | { code: 'START' }

Callers 30

reloadConfigFileFunction · 0.65
startFunction · 0.65
closeFunction · 0.65
NullProtoObjectViaIFrameFunction · 0.65
tryToTransferFunction · 0.65
sanity-checks.jsFile · 0.65
readFunction · 0.65
onUnhandledFunction · 0.65
onHandleUnhandledFunction · 0.65
index.jsFile · 0.65

Implementers 1

WatchEmittersrc/watch/WatchEmitter.ts

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…