Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/gitpod-protocol/src/ide-frontend-service.ts
2498 views
1
/**
2
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
import { Event } from "./util/event";
8
import { Disposable } from "./util/disposable";
9
10
export type IDEFrontendState = "init" | "ready" | "terminated";
11
12
export interface IDEFrontendService {
13
readonly state: IDEFrontendState;
14
/**
15
* A cause of the ide frontend application failure when state is terminated.
16
*/
17
readonly failureCause?: Error;
18
readonly onDidChange: Event<void>;
19
/**
20
* Starts the ide frontend application.
21
* Returns the disposable object which is triggered when the ide application should be stopped.
22
*
23
* On stop the application should store the unsaved changes.
24
* It won't receive any `beforeunload` events from window anymore to prevent
25
* confirmation dialogs for stopped workspaces.
26
*/
27
start(): Disposable;
28
}
29
30