From 0dff7bab33c09470f078150013b4063e8aa83227 Mon Sep 17 00:00:00 2001 From: "EchoLayer Bot (Stag)" Date: Tue, 12 Mar 2024 21:15:33 +0000 Subject: [PATCH] Renamed the variable 'ee' to 'eventEmitter' to make it more descriptive. --- codex-vscode/src/services/oauth.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codex-vscode/src/services/oauth.service.ts b/codex-vscode/src/services/oauth.service.ts index a1e1e68a..8c8f64db 100644 --- a/codex-vscode/src/services/oauth.service.ts +++ b/codex-vscode/src/services/oauth.service.ts @@ -17,7 +17,7 @@ export class OAuthService implements IOAuthService { */ public async authenticate(oAuthPath: OAuthPath): Promise { const oAuthPlatform: OAuthPlatform = oAuthPath === OAuthPath.google ? OAuthPlatform.google : OAuthPlatform.github; - const ee = OAuthUrlHandler.getInstance().getEventEmitter(); + const eventEmitter = OAuthUrlHandler.getInstance().getEventEmitter(); const uri = vscode.Uri.parse(`${process.env.API_URL}${oAuthPath}`); await vscode.env.openExternal(uri); @@ -26,7 +26,7 @@ export class OAuthService implements IOAuthService { // before completing it. if (!OAuthService.codeExchangePromise) { OAuthService.codeExchangePromise = promiseFromEvent( - ee.event, + eventEmitter.event, this.postAuthorization() ); } @@ -46,6 +46,7 @@ export class OAuthService implements IOAuthService { ]); } + // postAuthorization returns a function that is called from the promiseFromEvent function when the event is fired private postAuthorization: () => PromiseAdapter = () =>