Skip to content

Commit

Permalink
Remove any
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Oct 17, 2024
1 parent 59b36d4 commit 4cf8231
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/voila/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"browserslist": ">0.8%, not ie 11, not op_mini all, not dead",
"dependencies": {
"@voila-dashboards/widgets-manager8": "^0.5.7",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
"@jupyterlab/apputils-extension": "^4.0.0",
Expand Down
15 changes: 10 additions & 5 deletions packages/voila/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import { IRenderMime } from '@jupyterlab/rendermime';

import { IShell, VoilaShell } from './shell';

// Only import the type, it is important to not import the library at runtime
// to not pollute the shared packages with widgets related things
import { type VoilaWidgetManager } from '@voila-dashboards/widgets-manager8/lib/manager';


const PACKAGE = require('../package.json');

/**
Expand Down Expand Up @@ -119,23 +124,23 @@ export class VoilaApp extends JupyterFrontEnd<IShell> {
/**
* A promise that resolves when the Voila Widget Manager is created
*/
get widgetManagerPromise(): PromiseDelegate<any> {
get widgetManagerPromise(): PromiseDelegate<VoilaWidgetManager> {
return this._widgetManagerPromise;
}

set widgetManager(manager: any) {
set widgetManager(manager: VoilaWidgetManager | null) {
this._widgetManager = manager;
if (this._widgetManager) {
this._widgetManagerPromise.resolve(this._widgetManager);
}
}

get widgetManager(): any {
get widgetManager(): VoilaWidgetManager | null {
return this._widgetManager;
}

protected _widgetManager: any = null;
protected _widgetManagerPromise = new PromiseDelegate<any>();
protected _widgetManager: VoilaWidgetManager | null = null;
protected _widgetManagerPromise = new PromiseDelegate<VoilaWidgetManager>();
}

/**
Expand Down

0 comments on commit 4cf8231

Please sign in to comment.