Added a workaround for missing port#properties.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2022-08-24 12:48:13 +02:00
committed by Akos Kitta
parent f7f644cf36
commit 474d5e5975
2 changed files with 36 additions and 4 deletions

View File

@@ -462,6 +462,16 @@ export class BoardsServiceProvider implements FrontendApplicationContribution {
return this._availableBoards;
}
/**
* @deprecated Do not use this API, it will be removed. This is a hack to be able to set the missing port `properties` before an upload.
*
* See: https://github.com/arduino/arduino-ide/pull/1335#issuecomment-1224355236.
*/
// TODO: remove this API and fix the selected board config store/restore correctly.
get availablePorts(): Port[] {
return this._availablePorts.slice();
}
async waitUntilAvailable(
what: Board & { port: Port },
timeout?: number