Learn how to get the most out of Cursor AI — one of the hottest tools in AI-assisted coding, with practical workflows and underrated features.
Learn about OpenAI vs open source LLMs for frontend devs, with an integration guide, costs, performance comparison, and implementation tips.
Compare fine-tuning vs. RAG to design faster, smarter, and more responsive AI-powered frontend experiences.
Navigation menu errors are common, even for seasoned developers. Learn seven common navigation menu errors and how to solve them using CSS.
2 Replies to "Organizing TypeScript code using namespaces"
What I don’t understand, in 2021 why would you not use modules in every scenario. You’ve said for codebase that is only being patched namespaces are preferable over modules, but who said that, and why is that? I’d prefer modules regardless of where the code is in its lifecycle and I cannot think of a disadvantage in keeping everything tightly scoped. I think you need to expand on that as in your whole article it’s the only part that gives any reason why you would use this strategy atall.
Namespaces is a legacy feature which wouldn’t make it if typescript was created today.