-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
kernelspec.ts
40 lines (35 loc) · 1.07 KB
/
kernelspec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import { ISignal } from '@lumino/signaling';
import { IManager as IBaseManager } from '../basemanager';
import { ISpecModel, ISpecModels } from './restapi';
export { ISpecModel, ISpecModels };
/**
* Object which manages kernel instances for a given base url.
*
* #### Notes
* The manager is responsible for maintaining the state of kernel specs.
*/
export interface IManager extends IBaseManager {
/**
* A signal emitted when the kernel specs change.
*/
specsChanged: ISignal<IManager, ISpecModels>;
/**
* The kernel spec models.
*
* #### Notes
* The value will be null until the manager is ready.
*/
readonly specs: ISpecModels | null;
/**
* Force a refresh of the specs from the server.
*
* @returns A promise that resolves when the specs are fetched.
*
* #### Notes
* This is intended to be called only in response to a user action,
* since the manager maintains its internal state.
*/
refreshSpecs(): Promise<void>;
}