Skip to content

Commit 01f10e3

Browse files
committed
Fix typescript to comply with jlab3 reqs
1 parent eace279 commit 01f10e3

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/editor.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ w.mxLoadResources = false;
3131
/* This is a typing-only import. If you use it directly, the mxgraph content
3232
will be included in the main JupyterLab js bundle.
3333
*/
34+
// @ts-ignore
3435
import * as MXModuleType from './mxgraph/javascript/examples/grapheditor/www/modulated.js';
3536

3637
import {
@@ -257,10 +258,8 @@ namespace Private {
257258
}
258259

259260
_mxLoading = new PromiseDelegate();
260-
_mx = await import(
261-
/* webpackChunkName: "mxgraph" */
262-
'./mxgraph/javascript/examples/grapheditor/www/modulated.js'
263-
);
261+
// @ts-ignore
262+
_mx = await import('./mxgraph/javascript/examples/grapheditor/www/modulated.js');
264263
_mxLoading.resolve(_mx);
265264
return _mx;
266265
}

src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
import {
16-
ILayoutRestorer, JupyterLab, JupyterFrontEndPlugin
16+
ILayoutRestorer, JupyterFrontEnd, JupyterFrontEndPlugin
1717
} from '@jupyterlab/application';
1818

1919
import {
@@ -53,20 +53,20 @@ const IDrawioTracker = new Token<IDrawioTracker>('drawio/tracki');
5353
/**
5454
* The editor tracker extension.
5555
*/
56-
const plugin: JupyterFrontEndPlugin<IDrawioTracker> = {
57-
activate,
56+
const extension: JupyterFrontEndPlugin<IDrawioTracker> = {
5857
id: '@jupyterlab/drawio-extension:plugin',
58+
autoStart: true,
5959
requires: [IFileBrowserFactory, ILayoutRestorer, IMainMenu, ICommandPalette],
6060
optional: [ILauncher],
6161
provides: IDrawioTracker,
62-
autoStart: true
62+
activate
6363
};
6464

65-
export default plugin;
65+
export default extension;
6666

67-
function activate(app: JupyterLab,
67+
function activate(app: JupyterFrontEnd,
6868
browserFactory: IFileBrowserFactory,
69-
restorer: ILayoutRestorer,
69+
restorer: ILayoutRestorer,
7070
menu: IMainMenu,
7171
palette: ICommandPalette,
7272
launcher: ILauncher | null

0 commit comments

Comments
 (0)