init: programmers

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-07-21 17:39:22 +02:00
parent 07692fe368
commit e77c9721cd
10 changed files with 151 additions and 64 deletions

View File

@@ -205,6 +205,7 @@ export interface BoardDetails {
readonly fqbn: string;
readonly requiredTools: Tool[];
readonly configOptions: ConfigOption[];
readonly programmers: Programmer[];
}
export interface Tool {
@@ -269,6 +270,23 @@ export interface ConfigValue {
readonly selected: boolean;
}
export interface Programmer {
readonly name: string;
readonly platform: string;
readonly id: string;
}
export namespace Programmer {
export function equals(left: Programmer | undefined, right: Programmer | undefined): boolean {
if (!left) {
return !right;
}
if (!right) {
return !left;
}
return left.id === right.id && left.name === right.name && left.platform === right.platform;
}
}
export namespace Board {
export function is(board: any): board is Board {