How to fix Cannot use namespace as a type in TypeScript | DevErrors