How to fix The left-hand side of an assignment expression must be a variable or a property access in TypeScript | DevErrors