mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-09 02:18:32 +00:00
Switched to the official arduino-cli.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -23,29 +23,21 @@ export interface Board {
|
||||
|
||||
export interface AttachedSerialBoard extends Board {
|
||||
port: string;
|
||||
type: 'serial';
|
||||
serialNumber?: string;
|
||||
productID?: string;
|
||||
vendorID?: string;
|
||||
}
|
||||
|
||||
export namespace AttachedSerialBoard {
|
||||
export function is(b: Board): b is AttachedSerialBoard {
|
||||
return 'type' in b && (b as Board & { type: any }).type === 'serial' &&
|
||||
'port' in b && !!(b as Board & { port: any }).port && typeof (b as Board & { port: any }).port === 'string';
|
||||
return 'port' in b;
|
||||
}
|
||||
}
|
||||
|
||||
export interface AttachedNetworkBoard extends Board {
|
||||
info?: string;
|
||||
address?: string;
|
||||
port: number;
|
||||
type: 'network';
|
||||
address: string;
|
||||
port: string;
|
||||
}
|
||||
|
||||
export namespace AttachedNetworkBoard {
|
||||
export function is(b: Board): b is AttachedNetworkBoard {
|
||||
return 'type' in b && (b as Board & { type: any }).type === 'network' &&
|
||||
'port' in b && !!(b as Board & { port: any }).port && typeof (b as Board & { port: any }).port === 'number';
|
||||
return 'address' in b && 'port' in b;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user