mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
Inline parameters to execution task start and end
This commit is contained in:
@@ -447,7 +447,7 @@ class NotebookCellExecutionTask extends Disposable {
|
||||
});
|
||||
},
|
||||
|
||||
start(context?: vscode.NotebookCellExecuteStartContext): void {
|
||||
start(startTime?: number): void {
|
||||
if (that._state === NotebookCellExecutionTaskState.Resolved || that._state === NotebookCellExecutionTaskState.Started) {
|
||||
throw new Error('Cannot call start again');
|
||||
}
|
||||
@@ -457,11 +457,11 @@ class NotebookCellExecutionTask extends Disposable {
|
||||
|
||||
that.mixinMetadata({
|
||||
runState: NotebookCellExecutionState.Executing,
|
||||
runStartTime: context?.startTime ?? null
|
||||
runStartTime: startTime ?? null
|
||||
});
|
||||
},
|
||||
|
||||
end(result?: vscode.NotebookCellExecuteEndContext): void {
|
||||
end(success: boolean | undefined, endTime?: number): void {
|
||||
if (that._state === NotebookCellExecutionTaskState.Resolved) {
|
||||
throw new Error('Cannot call resolve twice');
|
||||
}
|
||||
@@ -471,8 +471,8 @@ class NotebookCellExecutionTask extends Disposable {
|
||||
|
||||
that.mixinMetadata({
|
||||
runState: null,
|
||||
lastRunSuccess: result?.success ?? null,
|
||||
runEndTime: result?.endTime ?? null,
|
||||
lastRunSuccess: success ?? null,
|
||||
runEndTime: endTime ?? null,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user