The options used to initialize a JupyterLab object.

interface IOptions {
    availablePlugins?: IPluginInfo[];
    commandLinker?: CommandLinker;
    contextMenuRenderer?: IRenderer;
    deferred?: {
        matches: string[];
        patterns: string[];
    };
    devMode?: boolean;
    disabled?: {
        matches: string[];
        patterns: string[];
    };
    docRegistry?: DocumentRegistry;
    filesCached?: boolean;
    isConnected?: boolean;
    mimeExtensions?: IRenderMime.IExtensionModule[];
    paths?: Partial<JupyterFrontEnd.IPaths>;
    pluginRegistry?: PluginRegistry<any>;
    restored?: Promise<any>;
    serviceManager?: ServiceManager.IManager;
    shell?: ILabShell;
    validatePlugin?: ((plugin) => boolean);
}

Hierarchy

Properties

availablePlugins?: IPluginInfo[]

The information about available plugins.

commandLinker?: CommandLinker

The command linker used by the application.

contextMenuRenderer?: IRenderer

A custom renderer for the context menu.

deferred?: {
    matches: string[];
    patterns: string[];
}

The collection of deferred extension patterns and matched extensions.

Type declaration

  • matches: string[]
  • patterns: string[]
devMode?: boolean

Whether the application is in dev mode.

disabled?: {
    matches: string[];
    patterns: string[];
}

The collection of disabled extension patterns and matched extensions.

Type declaration

  • matches: string[]
  • patterns: string[]
docRegistry?: DocumentRegistry

The document registry instance used by the application.

filesCached?: boolean

Whether files are cached on the server.

isConnected?: boolean

Every periodic network polling should be paused while this is set to false. Extensions should use this value to decide whether to proceed with the polling. The extensions may also set this value to false if there is no need to fetch anything from the server backend basing on some conditions (e.g. when an error message dialog is displayed). At the same time, the extensions are responsible for setting this value back to true.

mimeExtensions?: IRenderMime.IExtensionModule[]

The mime renderer extensions.

pluginRegistry?: PluginRegistry<any>

Application plugin registry.

If defined the options related to the plugin registry will be ignored.

restored?: Promise<any>

Promise that resolves when state is first restored, returning layout description.

serviceManager?: ServiceManager.IManager

The service manager used by the application.

shell?: ILabShell

The shell widget to use for the application.

This should be a newly created and initialized widget.

The application will attach the widget to the DOM.

validatePlugin?: ((plugin) => boolean)

Validate that a plugin is allowed to be registered.

Default is () => true.

Type declaration

    • (plugin): boolean
    • Parameters

      • plugin: IPlugin<any, any>

        The plugin to validate

      Returns boolean

Returns

Whether the plugin can be registered or not.

Notes

We recommend you print a console message with the reason a plugin is invalid.