Skip to content

Commit

Permalink
plugin: fix notebook stubs (#12003)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vince-fugnitto authored Dec 19, 2022
1 parent 29feb48 commit 885d50e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/plugin-ext/src/plugin/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ export function createAPIFactory(
notebook: theia.NotebookDocument,
controller: theia.NotebookController
): (void | Thenable<void>) { },
onDidChangeSelectedNotebooks: ({} as theia.Event<{ readonly notebook: theia.NotebookDocument; readonly selected: boolean }>),
onDidChangeSelectedNotebooks: () => Disposable.create(() => {}),
updateNotebookAffinity: (notebook: theia.NotebookDocument, affinity: theia.NotebookControllerAffinity) => undefined,
dispose: () => undefined,
};
Expand All @@ -1086,8 +1086,8 @@ export function createAPIFactory(
) {
return {
rendererId,
onDidReceiveMessage: ({} as theia.Event<{ readonly editor: theia.NotebookEditor; readonly message: any }>),
postMessage: (message: any, editor?: theia.NotebookEditor) => ({} as Thenable<boolean>),
onDidReceiveMessage: () => Disposable.create(() => {} ),
postMessage: () => Promise.resolve({}),
};
},
registerNotebookCellStatusBarItemProvider(
Expand Down

0 comments on commit 885d50e

Please sign in to comment.