MCPcopy Create free account
hub / github.com/Snapchat/Valdi / fire

Method fire

valdi/vscode_debugger/src/common/events.ts:49–59  ·  view source on GitHub ↗
(event: T)

Source from the content-addressed store, hash-verified

47 }
48
49 fire(event: T): void {
50 const dispatch = !this._deliveryQueue;
51 if (!this._deliveryQueue) this._deliveryQueue = [];
52 for (const data of this._listeners) this._deliveryQueue.push({ data, event });
53 if (!dispatch) return;
54 for (let index = 0; index < this._deliveryQueue.length; index++) {
55 const { data, event } = this._deliveryQueue[index];
56 data.listener.call(data.thisArg, event);
57 }
58 this._deliveryQueue = undefined;
59 }
60
61 dispose() {
62 this._listeners.clear();

Callers 15

getLaunchersMethod · 0.80
_launchMethod · 0.80
flushMethod · 0.80
flushMethod · 0.80
initAdapterMethod · 0.80
pickTerminationFunction · 0.80
prepareLaunchFunction · 0.80
fireTerminatedEventFunction · 0.80
constructorMethod · 0.80
_attachedToTargetMethod · 0.80
_detachedFromTargetMethod · 0.80
_targetInfoChangedMethod · 0.80

Calls 2

callMethod · 0.65
pushMethod · 0.45

Tested by 1

pickTerminationFunction · 0.64