Fixing TypeScript declarations