Skip to content
Advertisement

Tag: nullable

TypeScript 4.6.4 is indicating that this code is not valid

How do I resolve this Typescript issue? Message from Console Error: src/app/auth/authservice.ts:56:20 – error TS2345: Argument of type ‘string | null’ is not assignable to parameter of type ‘string’. Type ‘null’ is not assignable to type ‘string’. I added the // @ts-ignore but WebStorm is complaining that there is an error. Answer Let’s ignore the fact that JSON.parse()’s call signature

Advertisement