File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,23 @@ export class JupyterExtension {
6161 * @param kernelID The ID of the kernel to execute the code on. If not provided, the default kernel is used.
6262 * @param onStdout A callback function to handle standard output messages from the code execution.
6363 * @param onStderr A callback function to handle standard error messages from the code execution.
64+ * @param onDisplayData A callback function to handle display data messages from the code execution.
6465 * @returns A promise that resolves with the result of the code execution.
6566 */
6667 async execCell (
6768 code : string ,
68- kernelID ?: string ,
69- onStdout ?: ( msg : ProcessMessage ) => any ,
70- onStderr ?: ( msg : ProcessMessage ) => any ,
71- onDisplayData ?: ( data : Data ) => any
69+ {
70+ kernelID,
71+ onStdout,
72+ onStderr,
73+ onDisplayData,
74+ } : {
75+ kernelID ?: string
76+ onStdout ?: ( msg : ProcessMessage ) => Promise < void > | void
77+ onStderr ?: ( msg : ProcessMessage ) => Promise < void > | void
78+ onDisplayData ?: ( data : Data ) => Promise < void > | void
79+ }
80+
7281 ) : Promise < Result > {
7382 kernelID = kernelID || await this . defaultKernelID
7483 const ws = this . connectedKernels [ kernelID ] || await this . connectToKernelWS ( kernelID )
You can’t perform that action at this time.
0 commit comments