How to fix Constructor of class 'X' is not compatible with constructor signature of type 'Y' in TypeScript | DevErrors