mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
Better lifecycle handling (#242758)
I moved to a factory model because there was just so much that needed to be async. I think the amount of async code will be reduced in the future as we remove some migration logic, but this makes sure we don't accidentally create instances without awaiting their initialization.
This commit is contained in:
committed by
GitHub
parent
0664c2e142
commit
eab6f90c72
@@ -5,8 +5,7 @@
|
||||
import type { AccountInfo, AuthenticationResult, InteractiveRequest, RefreshTokenRequest, SilentFlowRequest } from '@azure/msal-node';
|
||||
import type { Disposable, Event } from 'vscode';
|
||||
|
||||
export interface ICachedPublicClientApplication extends Disposable {
|
||||
initialize(): Promise<void>;
|
||||
export interface ICachedPublicClientApplication {
|
||||
onDidAccountsChange: Event<{ added: AccountInfo[]; changed: AccountInfo[]; deleted: AccountInfo[] }>;
|
||||
onDidRemoveLastAccount: Event<void>;
|
||||
acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult>;
|
||||
|
||||
Reference in New Issue
Block a user