Argument of type 'string | null' is not assignable to parameter of type 'string | number | boolean'.
Type 'null' is not assignable to type 'string | number | boolean'.ts(2345)
(property) User.token: string | nullenter image description hereenter code here
CodePudding user response:
you can explicitly tell ts that this string is not null by the !
bang operator, if you are really sure it will be there
.set('auth', user.token!)