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

Function get

src/standalone/devTools/jupyterOutputChannel.ts:20–37  ·  view source on GitHub ↗
(target: IOutputChannel, propKey: keyof IOutputChannel)

Source from the content-addressed store, hash-verified

18 disposables.push(jupyterServerOutputChannel);
19 const handler: ProxyHandler<IOutputChannel> = {
20 get(target: IOutputChannel, propKey: keyof IOutputChannel) {
21 const method = target[propKey];
22 if (typeof method === 'function') {
23 if (propKey === 'append') {
24 return (...args: Parameters<IOutputChannel['append']>) => {
25 jupyterServerOutputChannel.append(...args);
26 formatMessageAndLog(...args);
27 };
28 }
29 if (propKey === 'appendLine') {
30 return (...args: Parameters<IOutputChannel['appendLine']>) => {
31 jupyterServerOutputChannel.appendLine(...args);
32 formatMessageAndLog(...args);
33 };
34 }
35 }
36 return method;
37 }
38 };
39 return new Proxy(jupyterServerOutputChannel, handler);
40}

Callers

nothing calls this directly

Calls 3

formatMessageAndLogFunction · 0.85
appendMethod · 0.45
appendLineMethod · 0.45

Tested by

no test coverage detected