How to fix Parameter 'x' of constructor gets a default value, which is not allowed in TypeScript | DevErrors