Skip to content

Commit 885d50e

Browse files
plugin: fix notebook stubs (#12003)
The commit fixes some stubs from the `notebook` API which prevented extensions from activating and producing errors. Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
1 parent 29feb48 commit 885d50e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/plugin-ext/src/plugin/plugin-context.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ export function createAPIFactory(
10751075
notebook: theia.NotebookDocument,
10761076
controller: theia.NotebookController
10771077
): (void | Thenable<void>) { },
1078-
onDidChangeSelectedNotebooks: ({} as theia.Event<{ readonly notebook: theia.NotebookDocument; readonly selected: boolean }>),
1078+
onDidChangeSelectedNotebooks: () => Disposable.create(() => {}),
10791079
updateNotebookAffinity: (notebook: theia.NotebookDocument, affinity: theia.NotebookControllerAffinity) => undefined,
10801080
dispose: () => undefined,
10811081
};
@@ -1086,8 +1086,8 @@ export function createAPIFactory(
10861086
) {
10871087
return {
10881088
rendererId,
1089-
onDidReceiveMessage: ({} as theia.Event<{ readonly editor: theia.NotebookEditor; readonly message: any }>),
1090-
postMessage: (message: any, editor?: theia.NotebookEditor) => ({} as Thenable<boolean>),
1089+
onDidReceiveMessage: () => Disposable.create(() => {} ),
1090+
postMessage: () => Promise.resolve({}),
10911091
};
10921092
},
10931093
registerNotebookCellStatusBarItemProvider(

0 commit comments

Comments
 (0)