Return cancelled, not undefined for azure login (#11656)

* Return cancelled, not undefined.

* fallback to reject

* Add type to the rejection

* add default
This commit is contained in:
Amir Omidi
2020-08-05 14:48:47 -07:00
committed by GitHub
parent 28f1321ad7
commit 9c67832880
5 changed files with 15 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ const localize = nls.loadMessageBundle();
export class AzureAccountProvider implements azdata.AccountProvider, vscode.Disposable {
private static readonly CONFIGURATION_SECTION = 'accounts.azure.auth';
private readonly authMappings = new Map<AzureAuthType, AzureAuth>();
private initComplete: Deferred<void>;
private initComplete: Deferred<void, Error>;
private initCompletePromise: Promise<void> = new Promise<void>((resolve, reject) => this.initComplete = { resolve, reject });
constructor(