Good day. I\'m new to Type Script, using VSCode.
Getting following errors:
error TS2322: Type \'() => string\' is not assignable to type
you just use variable type any and remove these types of problem.
error code :
let accessToken = res;
localStorage.setItem(LocalStorageConstants.TOKEN_KEY, accessToken);
given error Argument of type '{}' is not assignable to parameter of type 'string'.
success Code :
var accessToken:any = res;
localStorage.setItem(LocalStorageConstants.TOKEN_KEY, accessToken);
we create var type variable then use variable type any and resolve this issue.
any = handle any type of value so that remove error.