mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-09 20:36:32 +00:00
Moved System
declaration before its use-site.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
9298a8cc55
commit
e6e042c856
@ -30,24 +30,6 @@ export namespace DaemonLog {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Tool {
|
|
||||||
readonly version: string;
|
|
||||||
readonly systems: System[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace Tool {
|
|
||||||
|
|
||||||
export function is(arg: any | undefined): arg is Tool {
|
|
||||||
return !!arg && typeof arg.version === 'string' && 'systems' in arg;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function toString(tool: Tool): string {
|
|
||||||
const { version, systems } = tool;
|
|
||||||
return `Version: ${version}${!!systems ? ` Systems: [${tool.systems.map(System.toString).join(', ')}]` : ''}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface System {
|
export interface System {
|
||||||
readonly os: string;
|
readonly os: string;
|
||||||
// readonly Resource: Resource;
|
// readonly Resource: Resource;
|
||||||
@ -59,6 +41,24 @@ export namespace DaemonLog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Tool {
|
||||||
|
readonly version: string;
|
||||||
|
readonly systems: System[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Tool {
|
||||||
|
|
||||||
|
export function is(arg: any | undefined): arg is Tool {
|
||||||
|
return !!arg && typeof arg.version === 'string' && 'systems' in arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function toString(tool: Tool): string {
|
||||||
|
const { version, systems } = tool;
|
||||||
|
return `Version: ${version}${!!systems ? ` Systems: [${tool.systems.map(System.toString).join(', ')}]` : ''}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
export type Level = 'trace' | 'debug' | 'info' | 'warning' | 'error';
|
export type Level = 'trace' | 'debug' | 'info' | 'warning' | 'error';
|
||||||
|
|
||||||
export function is(arg: any | undefined): arg is DaemonLog {
|
export function is(arg: any | undefined): arg is DaemonLog {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user