MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / emit

Method emit

src/kernels/common/kernelSocketWrapper.ts:112–125  ·  view source on GitHub ↗
(event: string | symbol, ...args: any[])

Source from the content-addressed store, hash-verified

110 }
111
112 public override emit(event: string | symbol, ...args: any[]): boolean {
113 if (event === 'unexpected-response' && args.length === 2) {
114 const response: Record<string, any> | undefined = args[1];
115 logger.error(
116 `Error in websocket: (${response?.statusCode}) ${response?.statusMessage}, ${response?.path}, Headers = ${JSON.stringify(
117 response?.headers
118 )}`
119 );
120 }
121 if (event === 'error') {
122 logger.error(`Error in websocket`, args.length ? args[0] : undefined);
123 }
124 return this.handleEvent((ev, ...args) => super.emit(ev, ...args), event, ...args);
125 }
126
127 public addReceiveHook(hook: (data: WebSocketWS.Data) => Promise<void>) {
128 this.receiveHooks.push(hook);

Callers 11

disposeFunction · 0.45
onPropertyChangedFunction · 0.45
onKernelChangedFunction · 0.45
onStatusChangedFunction · 0.45
onIOPubMessageFunction · 0.45
onUnhandledMessageFunction · 0.45
onAnyMessageFunction · 0.45
onPendingInputFunction · 0.45

Calls 2

handleEventMethod · 0.95
errorMethod · 0.65

Tested by

no test coverage detected