How to fix Variable 'x' is assigned a value but never used in TypeScript | DevErrors