Closed elliott-with-the-longest-name-on-github closed 3 years ago
@tcc-sejohnson Thanks for opening this! This is definitely something we can take a look at. I will try to push a fix for this shortly.
@pkanher617 Awesome! There are a few of these I've noticed. I'll see if I can catalogue them as I come upon them.
Library
msal@1.x.x
or@azure/msal@1.x.x
@azure/msal-browser@2.11.2
@azure/msal-node@1.x.x
@azure/msal-react@1.0.0-alpha.6
@azure/msal-angular@0.x.x
@azure/msal-angular@1.x.x
@azure/msal-angular@2.x.x
@azure/msal-angularjs@1.x.x
Framework
Description
Error Message
Type 'AccountInfo | null' is not assignable to type 'AccountInfo | undefined'. Type 'null' is not assignable to type 'AccountInfo | undefined'.ts(2322)
MSAL Configuration
Not providing this, as it has no bearing on the bug!
Reproduction steps
This is a super simple issue. The definition of
IPublicClientApplication.logout
has itsaccount
key defined asAccountInfo | undefined
, while the return type ofIPublicClientApplication.getActiveAccount
isAccountInfo | null
. It seems like these two signatures should match, so that you can do the following:Instead of having to do this:
Obviously not a game-breaker, but seems like a pretty simple QOL change.
Expected behavior
Identity Provider
Browsers/Environment
Regression
Security
Source