import { INotebookShell } from '@jupyter-notebook/application'; import { ILabShell } from '@jupyterlab/application'; import { IThemeManager } from '@jupyterlab/apputils'; import { IEditorExtensionRegistry } from '@jupyterlab/codemirror'; import { WidgetLSPAdapter, VirtualDocument } from '@jupyterlab/lsp'; import { TranslationBundle } from '@jupyterlab/translation'; import * as lsProtocol from 'vscode-languageserver-protocol'; import { CodeDiagnostics as LSPDiagnosticsSettings } from '../../_diagnostics'; import { IFeatureSettings, Feature } from '../../feature'; import { BrowserConsole } from '../../virtual/console'; import { DiagnosticsDatabase } from './listing'; import { IDiagnosticsFeature } from './tokens'; export declare class DiagnosticsFeature extends Feature implements IDiagnosticsFeature { readonly id: string; readonly capabilities: lsProtocol.ClientCapabilities; protected settings: IFeatureSettings; protected console: BrowserConsole; private _firstResponseReceived; private _diagnosticsDatabases; constructor(options: DiagnosticsFeature.IOptions); private _reconfigureTheme; clearDocumentDiagnostics(adapter: WidgetLSPAdapter, document: VirtualDocument): void; /** * Allows access to the most recent diagnostics in context of the editor. * * One can use VirtualEditorForNotebook.find_cell_by_editor() to find * the corresponding cell in notebook. * Can be used to implement a Panel showing diagnostics list. * * Maps virtualDocument.uri to IEditorDiagnostic[]. */ getDiagnosticsDB(adapter: WidgetLSPAdapter): DiagnosticsDatabase; switchDiagnosticsPanelSource: (adapter: WidgetLSPAdapter | null) => void; protected diagnosticsByRange(diagnostics: lsProtocol.Diagnostic[]): Map; get defaultSeverity(): lsProtocol.DiagnosticSeverity; private filterDiagnostics; setDiagnostics(response: lsProtocol.PublishDiagnosticsParams, document: VirtualDocument, adapter: WidgetLSPAdapter): void; handleDiagnostic: (response: lsProtocol.PublishDiagnosticsParams, document: VirtualDocument, adapter: WidgetLSPAdapter) => Promise; refreshDiagnostics(): void; private _lastResponse; private _lastDocument; private _lastAdapter; private _trans; private _invalidate; private _invalidationCounter; private _styleElement; } export declare namespace DiagnosticsFeature { interface IOptions extends Feature.IOptions { settings: IFeatureSettings; shell: ILabShell | INotebookShell; trans: TranslationBundle; editorExtensionRegistry: IEditorExtensionRegistry; themeManager: IThemeManager | null; } const id: string; }