maxmantz/redux-oidc

Type of successCallback parameter on SignoutCallbackComponent should be SignoutResponse not User

cymen opened this issue · 1 comments

cymen commented

I noticed that SignoutCallbackComponent is setting the type of the successCallback parameter to User when it should be SignoutResponse. The two are similar with the same state key in the object but SignoutResponse has a different shape otherwise.

SignoutReponse: https://github.com/IdentityModel/oidc-client-js/blob/dev/src/SignoutResponse.js
User: https://github.com/IdentityModel/oidc-client-js/blob/dev/src/User.js

cymen commented

Found it: https://github.com/maxmantz/redux-oidc/blob/master/index.d.ts#L21-L34

So problem is CallbackComponentProps is used for both callback types but it has readonly successCallback: (user: User) => void; and for SignoutCallbackComponent it should be readonly successCallback: (response: SignoutResponse) => void;.