How to fix Interface declaration cannot declare a class field in TypeScript | DevErrors