Closed Daniel-Khodabakhsh closed 3 years ago
A PR to fix this issue is available: https://github.com/IdentityModel/oidc-client-js/pull/1189
Hey @brockallen would you be able to take a look at my PR? Or do you now who I can ping? https://github.com/IdentityModel/oidc-client-js/pull/1189
Pull request #1189 merged.
The typing for
UserManager.signoutCallback
currently makes this method returnSignoutResponse | void
.Although legal, variables should not be of type
void
, from the typescript specifications:Additionally, attempting to use a variable of type
SignoutResponse | void
won't let us treat it asnull
orundefined
like in the next example:Using
undefined
ornull
forUserManager.signoutCallback
works for the above example and is semantically correct because there is a chanceSignoutResponse
or nothing is returned (undefined
).Using
void
here is not semantically correct becauseUserManager.signoutCallback
can return something, even if that something isundefined
. Also, usingvoid
forces developers to hack arounduserManager.signoutCallback
's return type in order to use strict typing.