This piece of code was working fine
export function appInitializer(accountService: AccountService) {
return () => new Promise(resolve => {
// attempt to refresh token on app start up to auto authenticate
accountService.refreshToken()
.subscribe()
.add(resolve);
});
}
but now after updating rxjs from version 6.5.5 to 7.4.0, I have this error when I add resolve to the Subscription :
(parameter) resolve: (value: unknown) => void Argument of type '(value: unknown) => void' is not assignable to parameter of type 'TeardownLogic'. Type '(value: unknown) => void' is not assignable to type '() => void'.ts(2345) app.initializer.ts(8, 18): Did you mean to call this expression?
The angular project I am trying to modify is available here
My noob question is: How can I get this code to work again without having to go back to rxjs v6.5.5?