mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-08 01:48:32 +00:00
feat: use Arduino CLI 0.36.0-rc.1 APIs
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -74,8 +74,8 @@ export class DaemonPort implements FrontendApplicationContribution {
|
||||
@inject(NotificationCenter)
|
||||
private readonly notificationCenter: NotificationCenter;
|
||||
|
||||
private readonly onPortDidChangeEmitter = new Emitter<string | undefined>();
|
||||
private _port: string | undefined;
|
||||
private readonly onPortDidChangeEmitter = new Emitter<number | undefined>();
|
||||
private _port: number | undefined;
|
||||
|
||||
onStart(): void {
|
||||
this.daemon.tryGetPort().then(
|
||||
@@ -91,15 +91,15 @@ export class DaemonPort implements FrontendApplicationContribution {
|
||||
this.onPortDidChangeEmitter.dispose();
|
||||
}
|
||||
|
||||
get port(): string | undefined {
|
||||
get port(): number | undefined {
|
||||
return this._port;
|
||||
}
|
||||
|
||||
get onDidChangePort(): Event<string | undefined> {
|
||||
get onDidChangePort(): Event<number | undefined> {
|
||||
return this.onPortDidChangeEmitter.event;
|
||||
}
|
||||
|
||||
private setPort(port: string | undefined): void {
|
||||
private setPort(port: number | undefined): void {
|
||||
const oldPort = this._port;
|
||||
this._port = port;
|
||||
if (this._port !== oldPort) {
|
||||
|
||||
Reference in New Issue
Block a user