Remove extra not null assertions (#202201)

* Remove extra not null assertions

With https://github.com/microsoft/TypeScript/pull/56908, TS should better preserve type refinements. To help test this out, I made a quick pass through our code to remove type assertions that are no longer needed

Most of these are not impacted by https://github.com/microsoft/TypeScript/pull/56908 but removing them helps TS test changes like this

Not adding an eslint rule for now as it requires whole program intellisense, which is too slow for commit hooks

* Fix merge
This commit is contained in:
Matt Bierner
2024-01-30 15:43:09 -08:00
committed by GitHub
parent adaf974eb2
commit 31fbc3dc94
177 changed files with 529 additions and 531 deletions
@@ -155,7 +155,7 @@ export class MainThreadAuthentication extends Disposable implements MainThreadAu
// modal flows
if (options.createIfNone || options.forceNewSession) {
const providerName = this.authenticationService.getLabel(providerId);
const detail = (typeof options.forceNewSession === 'object') ? options.forceNewSession!.detail : undefined;
const detail = (typeof options.forceNewSession === 'object') ? options.forceNewSession.detail : undefined;
// We only want to show the "recreating session" prompt if we are using forceNewSession & there are sessions
// that we will be "forcing through".