How to fix Member 'x' implicitly has an 'any' type because its type cannot be inferred from its initializer in TypeScript | DevErrors