Answers for "JSON.parse(localStorage.getItem('users') Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'."

1

JSON.parse(localStorage.getItem('users') Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'.

this.currentUser = JSON.parse(localStorage.getItem('currentUser')!);
Posted by: Guest on April-20-2021

Code answers related to "JSON.parse(localStorage.getItem('users') Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'."

Browse Popular Code Answers by Language