mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-10 02:48:33 +00:00
Regenerated TS RPC for daemon fork
This commit is contained in:
@@ -3,7 +3,7 @@ import { ArduinoComponent } from "./arduino-component";
|
||||
export const BoardsServicePath = '/services/boards-service';
|
||||
export const BoardsService = Symbol('BoardsService');
|
||||
export interface BoardsService {
|
||||
connectedBoards(): Promise<{ boards: Board[], current?: Board }>;
|
||||
attachedBoards(): Promise<{ boards: AttachedBoard[] }>;
|
||||
search(options: { query?: string }): Promise<{ items: Board[] }>;
|
||||
install(board: Board): Promise<void>;
|
||||
}
|
||||
@@ -11,3 +11,39 @@ export interface BoardsService {
|
||||
export interface Board extends ArduinoComponent {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AttachedBoard {
|
||||
name: string
|
||||
fqbn?: string
|
||||
}
|
||||
|
||||
export interface AttachedSerialBoard extends AttachedBoard {
|
||||
port: string;
|
||||
serialNumber: string;
|
||||
productID: string;
|
||||
vendorID: string;
|
||||
}
|
||||
|
||||
export namespace AttachedSerialBoard {
|
||||
export function is(b: AttachedBoard): b is AttachedSerialBoard {
|
||||
return 'port' in b
|
||||
&& 'serialNumber' in b
|
||||
&& 'productID' in b
|
||||
&& 'vendorID' in b;
|
||||
}
|
||||
}
|
||||
|
||||
export interface AttachedNetworkBoard extends AttachedBoard {
|
||||
info: string;
|
||||
address: string;
|
||||
port: number;
|
||||
}
|
||||
|
||||
export namespace AttachedNetworkBoard {
|
||||
export function is(b: AttachedBoard): b is AttachedNetworkBoard {
|
||||
return 'name' in b
|
||||
&& 'info' in b
|
||||
&& 'address' in b
|
||||
&& 'port' in b;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user