Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.63 OS Version: Windows 11 Steps to Reproduce: an extension which calls passing the newly finalized option TypeScript says the return type is potentially . Previously (prior to finalization) it said that the return type was I think the intent of the forceNewSession option is to ensure that getSession always returns an AuthenticationSession, but because forceNewSession has been to AuthenticationGetSessionOptions as part of api finalization, it now falls into this case rather than this case Is this something we can get fixed in the published types? I think if you switch their order, that would be enough (at least that seems to work locally). In the meantime I have worked around it by downloading the off the main branch, switching their order in that copy, and deleting the conflicting copy of from node_modules.
Candidate pushed via
Verification steps: In an extension, grab the from the release branch and replace the file with it. put this in your extension's code: The return type of that call should be NOT

Discussion:
* @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 {@link AuthenticationGetSessionOptions} to use <del> * @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions </del> <ins> * @returns A thenable that resolves to an authentication session </ins> */ <del> export function getSession(providerId: string, scopes: readonly string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>; </del> <ins> export function getSession(providerId: string, scopes: readonly string[], options: AuthenticationGetSessionOptions & { forceNewSession: true | { detail: string } }): Thenable<AuthenticationSession>; </ins> /** * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not

* @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 {@link AuthenticationGetSessionOptions} to use <del> * @returns A thenable that resolves to an authentication session </del> <ins> * @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions </ins> */ <del> export function getSession(providerId: string, scopes: readonly string[], options: AuthenticationGetSessionOptions & { forceNewSession: true | { detail: string } }): Thenable<AuthenticationSession>; </del> <ins> export function getSession(providerId: string, scopes: readonly string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>; </ins> /** * An {@link Event} which fires when the authentication sessions of an authentication provider have