How to fix Generic type 'X<T>' requires 1 type argument(s) in TypeScript | DevErrors