Can you spot the issue in this code snippet?
isAuthenticated(): boolean
{
var token = localStorage.getItem(ACCESS_TOKEN_KEY);
return token && !this.jwtHelper.isTokenExpired(token);
}
Error:
The variable is returning a type of 'string | boolean | null', which cannot be directly assigned to type 'boolean'.
Also, the error shows that 'null' is being wrongly assigned as 'boolean'.