-
-
Notifications
You must be signed in to change notification settings - Fork 435
/
Copy pathcore-service.ts
32 lines (26 loc) · 1023 Bytes
/
core-service.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
import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
import { Programmer } from './boards-service';
export const CoreServiceClient = Symbol('CoreServiceClient');
export interface CoreServiceClient {
notifyIndexUpdated(): void;
}
export const CoreServicePath = '/services/core-service';
export const CoreService = Symbol('CoreService');
export interface CoreService extends JsonRpcServer<CoreServiceClient> {
compile(options: CoreService.Compile.Options): Promise<void>;
upload(options: CoreService.Upload.Options): Promise<void>;
}
export namespace CoreService {
export namespace Compile {
export interface Options {
readonly sketchUri: string;
readonly fqbn: string;
readonly optimizeForDebug: boolean;
}
}
export namespace Upload {
export type Options =
Compile.Options & Readonly<{ port: string }> |
Compile.Options & Readonly<{ programmer: Programmer, port?: string }>;
}
}