I’m targetting jlab4 and am trying to add settings to an existing extension
using as a guideline the @jupyterlab-examples/settings
tutorial extension from https://github.com/jupyterlab/extension-examples/blob/a5c918e92d69964afbb3fdf865df5a6f54ae9a32/settings/README.md
And I’m facing a typescript compilation issue that I have not yet been able to figure out
I have this in my index.ts
import { ISettingRegistry } from '@jupyterlab/settingregistry'
and then
const plugin: JupyterFrontEndPlugin<void> = {
id: 'jupyterlab-tpt:plugin',
autoStart: true,
requires: [ICommandPalette, INotebookTracker, ISettingRegistry],
activate: (
app: JupyterFrontEnd,
palette: ICommandPalette,
notebookTracker: INotebookTracker,
settingRegistry: ISettingRegistry) => {
console.log('JupyterLab extension activating')
// <snip>
but then tsc
complains that
src/index.ts:214:49 - error TS2322: Type 'Token<ISettingRegistry>' is not assignable to type 'Token<any>'.
Types have separate declarations of a private property '_tokenStructuralPropertyT'.
214 requires: [ICommandPalette, INotebookTracker, ISettingRegistry],
~~~~~~~~~~~~~~~~
Not sure if that’s because of an error of mine - most likely - or something with jlab4 though
Does this ring any bell to anyone ?
Any hint welcome