UNPKG

1.2 kBTypeScriptView Raw
1import { Token } from '@lumino/coreutils';
2/**
3 * The default window resolver token.
4 */
5export declare const IWindowResolver: Token<IWindowResolver>;
6/**
7 * The description of a window name resolver.
8 */
9export interface IWindowResolver {
10 /**
11 * A window name to use as a handle among shared resources.
12 */
13 readonly name: string;
14}
15/**
16 * A concrete implementation of a window name resolver.
17 */
18export declare class WindowResolver implements IWindowResolver {
19 /**
20 * The resolved window name.
21 *
22 * #### Notes
23 * If the `resolve` promise has not resolved, the behavior is undefined.
24 */
25 get name(): string;
26 /**
27 * Resolve a window name to use as a handle among shared resources.
28 *
29 * @param candidate - The potential window name being resolved.
30 *
31 * #### Notes
32 * Typically, the name candidate should be a JupyterLab workspace name or
33 * an empty string if there is no workspace.
34 *
35 * If the returned promise rejects, a window name cannot be resolved without
36 * user intervention, which typically means navigation to a new URL.
37 */
38 resolve(candidate: string): Promise<void>;
39 private _name;
40}