Q:

Property 'token' does not exist on type '() => User'. any

I get an error, 
[ts] Property 'token' does not exist on type '() => User'.
any
I am using a user.ts file to a
export class User {
    id: number;
    username: string;
    password: string;
    firstName: string;
    lastName: string;
    token: string;
    }
This is my authentication service ts file:
export class AuthenticationService {
private currentUserSubject: BehaviorSubject<User>;
public $currentUser: Observable<User>;

constructor(private http: HttpClient, ) {
    this.currentUserSubject = new BehaviorSubject<User>(JSON.parse(localStorage.getItem('currentUser')));
    this.$currentUser = this.currentUserSubject.asObservable();
   }
public currentUserValue(): User {
    return this.currentUserSubject.value;
}

I get an error when I instantiate a function from authentication service ts to jwtinterceptor ts file:
[ts] Property 'token' does not exist on type '() => User'.
any
    intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
    // add authorization header with jwt token if available
    let currentUser = this.authenticationService.currentUserValue;
    if (currentUser && currentUser.token) {
        request = request.clone({
            setHeaders: { 
                Authorization: `Bearer ${currentUser.token}`
            }
        });
    }

    return next.handle(request);
}

A:

With this code let currentUser = this.authenticationService.currentUserValue; you are assigning the "function", not the result.
So just evaluate the function to get the returned object, replace with:
let currentUser = this.authenticationService.currentUserValue();

