Answers for "type 'null' is not assignable to type 'string'. in angular"

12

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 December-18-2020
-2

Type 'Event' is not assignable to type 'string'

import { FormsModule } from '@angular/forms';
...
imports: [
..,
FormsModule
],
Posted by: Guest on November-07-2021

Code answers related to "type 'null' is not assignable to type 'string'. in angular"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language