Optimizing TypeScript: Readability vs. Performance