Fix build
This commit is contained in:
parent
8e02737abc
commit
d1a59226f2
3 changed files with 7 additions and 6 deletions
8
src/vs/vscode.proposed.d.ts
vendored
8
src/vs/vscode.proposed.d.ts
vendored
|
@ -202,9 +202,9 @@ declare module 'vscode' {
|
|||
* @param providerId The id of the provider to use
|
||||
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
|
||||
* @param options The [getSessionOptions](#GetSessionOptions) to use
|
||||
* @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
|
||||
* @returns A thenable that resolves to an authentication session
|
||||
*/
|
||||
export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions): Thenable<AuthenticationSession2 | undefined>;
|
||||
export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession2>;
|
||||
|
||||
/**
|
||||
* Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
|
||||
|
@ -214,9 +214,9 @@ declare module 'vscode' {
|
|||
* @param providerId The id of the provider to use
|
||||
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
|
||||
* @param options The [getSessionOptions](#GetSessionOptions) to use
|
||||
* @returns A thenable that resolves to an authentication session
|
||||
* @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
|
||||
*/
|
||||
export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession2>;
|
||||
export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions): Thenable<AuthenticationSession2 | undefined>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
|
|
|
@ -199,8 +199,8 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
hasSessions(providerId: string, scopes: string[]): Thenable<boolean> {
|
||||
return extHostAuthentication.hasSessions(providerId, scopes);
|
||||
},
|
||||
getSession(providerId: string, scopes: string[], options: vscode.AuthenticationGetSessionOptions): Thenable<vscode.AuthenticationSession2 | undefined> {
|
||||
return extHostAuthentication.getSession(extension, providerId, scopes, options);
|
||||
getSession(providerId: string, scopes: string[], options: vscode.AuthenticationGetSessionOptions) {
|
||||
return extHostAuthentication.getSession(extension, providerId, scopes, options as any);
|
||||
},
|
||||
getSessions(providerId: string, scopes: string[]): Thenable<readonly vscode.AuthenticationSession[]> {
|
||||
return extHostAuthentication.getSessions(extension, providerId, scopes);
|
||||
|
|
|
@ -43,6 +43,7 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
|
|||
return !!(await provider.getSessions()).filter(session => session.scopes.sort().join(' ') === orderedScopes).length;
|
||||
}
|
||||
|
||||
async getSession(requestingExtension: IExtensionDescription, providerId: string, scopes: string[], options: vscode.AuthenticationGetSessionOptions & { createIfNone: true }): Promise<vscode.AuthenticationSession2>;
|
||||
async getSession(requestingExtension: IExtensionDescription, providerId: string, scopes: string[], options: vscode.AuthenticationGetSessionOptions): Promise<vscode.AuthenticationSession2 | undefined> {
|
||||
const provider = this._authenticationProviders.get(providerId);
|
||||
if (!provider) {
|
||||
|
|
Loading…
Reference in a new issue