I have the following:
let user: UserModel = getUser();
let active: Boolean = getStatus();
I tried the following condition:
if (active && user && user.claims && { Extra Condition using user.claims } ) {
}
I need active
to be true
and then check a condition with user.claims
.
But before I need to be sure that user
and user.claims
are defined.
However, I am getting two errors:
Type 'UserModel' is not assignable to type 'boolean'
Type 'Claim[]' is not assignable to type 'boolean'
How can I fix this?