- Typescript Daily
- Posts
- 📈 Bloomberg's TypeScript Odyssey: 10 Essential Insights in Minutes!
📈 Bloomberg's TypeScript Odyssey: 10 Essential Insights in Minutes!
🚀 Discover the Secrets to Seamless Large-Scale TypeScript Adoption. Read Now!
Bloomberg, with its vast JavaScript empire, embarked on a TypeScript adventure, and we've condensed their remarkable journey into a rapid-fire summary. Unearth the pivotal takeaways from Rob Palmer's exploration of TypeScript adoption at Bloomberg. From principles shaping their path to navigating TypeScript's quirks, this quick read unveils the wisdom gained during their voyage. So, fasten your seatbelts and join us on Bloomberg's TypeScript odyssey in just a few minutes!
🚀 Dive into the Fast Lane of TypeScript Adoption!
In the fast-paced world of tech, we know your time is precious. Discover the key insights from Bloomberg's journey with TypeScript, from principles guiding their adoption to sharp tsconfig edges and optimization strategies. Get ready for a high-speed tour through 10 essential takeaways from this fascinating exploration!
Read the full article here - https://www.bloomberg.com/company/stories/10-insights-adopting-typescript-at-scale/
Background: Bloomberg, with over 50 million lines of JavaScript code, transitioned to TypeScript for their colossal codebase.
Unique Integration: Bloomberg has its own JavaScript runtime environment, offering a seamless developer experience with TypeScript support.
Principles: Three key principles guided their TypeScript adoption: Scalability, Ecosystem Coherence, and Standards Alignment.
TypeScript = JavaScript + Types: TypeScript's separation of type syntax and type-checking from JavaScript allows for human-readable output and future ECMAScript compatibility.
Keep Up with the Compiler: TypeScript evolves rapidly, and upgrading may require intervention to benefit from new features.
Consistent tsconfig Settings: Standardizing tsconfig settings across projects helps maintain compatibility and coherence.
Specify Location of Dependencies: Bloomberg uses Ambient Modules to declare dependency locations, ensuring TypeScript understands package mappings.
De-duplicating Types: To ensure type-checking considers only one version of a package's dependencies, Bloomberg implemented a deterministic resolver.
Avoid Implicit Type Dependencies: Preventing global types and favoring explicit dependencies ensures code remains maintainable.
Declaration Files Modes: Declaration files operate in three modes: global, module, and implicit exports. Bloomberg avoids global declaration files.
Encapsulation of Packages: TypeScript lacks awareness of package exports, leading to issues with declaration generation.
Generated Declarations Optimization: Bloomberg implemented Dead Type Elimination (DTE) to reduce the volume of unnecessary type declarations.
Some Options Have Sharp Edges: Specific tsconfig options had unexpected implications, requiring workarounds.
The Great Parts: Bloomberg highlighted several positive aspects of TypeScript, including incremental builds, isolatedModules, project references, and type-only imports.
Conclusion: TypeScript has become a first-class language for Bloomberg's application platform, demonstrating flexibility and strong community and team support.
These insights provide valuable lessons for anyone considering a large-scale TypeScript adoption.
💌 Feedback Corner
Help us refine 'TypeScript Daily' to be your go-to TypeScript guide, with a special weekly roundup. Your feedback drives our content. Share your insights and suggestions with us! Please hit reply to this email and share your thoughts.
🏁 Wrapping It Up
Another day, another dive into the world of TypeScript. As we cross the finish line today, remember to keep exploring, keep learning, and most importantly, keep coding. If you found value in today's insights, please consider sharing this newsletter with friends or on social media — every share helps us reach more TypeScript enthusiasts like you! Stay tuned for tomorrow's journey.
Reply