Skip to content

Commit d73e386

Browse files
committed
Improve typing
1 parent b411fc4 commit d73e386

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/docprovider/src/notebookCellExecutor.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { URLExt } from '@jupyterlab/coreutils';
1313
import { INotebookCellExecutor } from '@jupyterlab/notebook';
1414
import { OutputPrompt, Stdin } from '@jupyterlab/outputarea';
15-
import { ServerConnection } from '@jupyterlab/services';
15+
import { Kernel, ServerConnection } from '@jupyterlab/services';
1616
import * as KernelMessage from '@jupyterlab/services/lib/kernel/messages';
1717
import { nullTranslator, type ITranslator } from '@jupyterlab/translation';
1818
import { PromiseDelegate } from '@lumino/coreutils';
@@ -126,12 +126,15 @@ export class NotebookCellServerExecutor implements INotebookCellExecutor {
126126
);
127127
const data = await response.json();
128128
success = data['status'] === 'ok';
129-
} catch (error: any) {
130-
onCellExecuted({ cell, success: false, error });
129+
} catch (error: unknown) {
130+
onCellExecuted({
131+
cell,
132+
success: false
133+
});
131134
if (cell.isDisposed) {
132135
return false;
133136
} else {
134-
throw await ServerConnection.ResponseError.create(error);
137+
throw error;
135138
}
136139
}
137140

@@ -199,7 +202,7 @@ async function requestServer(
199202
);
200203
});
201204
}
202-
}) as any,
205+
}) as Kernel.IShellFuture,
203206
parent_header,
204207
password: input_request.password,
205208
prompt: input_request.prompt,

0 commit comments

Comments
 (0)