Fixing TypeScript compilation