///
import { ISessionContext, SessionContext } from '@jupyterlab/apputils';
import { Kernel, KernelMessage, ServiceManager, Session } from '@jupyterlab/services';
import { AttachedProperty } from '@lumino/properties';
import { ISignal } from '@lumino/signaling';
import { Context } from './context';
import { TextModelFactory } from './default';
import { DocumentRegistry, IDocumentWidget } from './registry';
/**
* Create a context for a file.
*/
export declare function createFileContext(path?: string, manager?: ServiceManager.IManager): Context;
export declare function createFileContextWithKernel(path?: string, manager?: ServiceManager.IManager): Promise;
export declare function createFileContextWithMockedServices(startKernel?: boolean, manager?: ServiceManager.IManager): Promise;
/**
* Create a session and return a session connection.
*/
export declare function createSession(options: Session.ISessionOptions): Promise;
/**
* Create a session context given a partial session model.
*
* @param model The session model to use.
*/
export declare function createSimpleSessionContext(model?: Private.RecursivePartial): ISessionContext;
/**
* Emit an iopub message on a session context.
*
* @param sessionContext The session context
* @param msg Message created with `KernelMessage.createMessage`
*/
export declare function emitIopubMessage(context: ISessionContext, msg: KernelMessage.IIOPubMessage): void;
/**
* Forceably change the status of a session context.
* An iopub message is emitted for the change.
*
* @param sessionContext The session context of interest.
* @param newStatus The new kernel status.
*/
export declare function updateKernelStatus(sessionContext: ISessionContext, newStatus: KernelMessage.Status): void;
/**
* A mock session context.
*
* @param session The session connection object to use
*/
export declare const SessionContextMock: jest.Mock, Session.ISessionConnection | null], any>;
/**
* A namespace for module private data.
*/
declare namespace Private {
type RecursivePartial = {
[P in keyof T]?: RecursivePartial;
};
const textFactory: TextModelFactory;
/**
* Get or create the service manager singleton.
*/
function getManager(): ServiceManager;
const lastMessageProperty: AttachedProperty;
const RUNNING_KERNELS: Kernel.IKernelConnection[];
}
/**
* A mock document widget opener.
*/
export declare class DocumentWidgetOpenerMock {
get opened(): ISignal;
open(widget: IDocumentWidget): void;
private _opened;
}
export {};