Just published a new article on writing flexible code without losing type safety with TypeScript generics. A practical guide to building reusable abstractions while keeping strong, predictable types. 💬 Thoughts? Link in the first comment. #TypeScript #FrontendDevelopment #JavaScript #Generics #SoftwareEngineering #DevCommunity
Jakub Andrzejewski’s Post
More Relevant Posts
-
The Dev Journal #2 Clean code is not just about readability — it improves collaboration, debugging, and long-term maintainability. Code should work well, but it should also be easy to understand and build on. #FrontendEngineer #JavaScript #ReactJS #CodingPractices
To view or add a comment, sign in
-
-
DAY 20/21 - JavaScript is powerful but not perfect. That’s where TypeScript steps in.. 🚫 Problems with JavaScript: • No type safety → runtime errors • Hard to maintain large codebases • Poor tooling & auto-completion ✅ How TypeScript solves it: • Adds static typing → catches errors early • Improves code readability & scalability • Better IDE support (auto-suggest, refactoring) • Makes collaboration smoother in teams In short: TypeScript = JavaScript with superpowers. If you're building anything beyond small projects, TypeScript isn’t optional anymore, it's essential. #TypeScript #JavaScript #WebDevelopment #Coding #Developers
To view or add a comment, sign in
-
-
Hoisting is a behavior in JavaScript where variable and function declarations are conceptually moved to the top of their containing scope (either the global script or a specific function) during the compilation phase, before the code is actually executed. It is important to understand that your code isn't physically moved anywhere. Instead, the JavaScript engine allocates memory for variable and function declarations before it executes the code line-by-line. #javascript #hoisting #frontend #scripting
To view or add a comment, sign in
-
-
JavaScript scoping still breaks more code than people admit. Not because developers don’t know syntax. Because they assume var behaves like let. It doesn’t. let / const → block scope var → function scope That tiny difference still causes: - hidden bugs - confusing loops - unexpected values in legacy code If you work with older JavaScript codebases, this still matters a lot. #javascript #frontend #webdevelopment #reactjs #coding
To view or add a comment, sign in
-
🚀 JavaScript vs TypeScript — Which one do you prefer? Here’s a simple breakdown 👇 🟡 JavaScript ✔ Easy to start ✔ Flexible ❗ But errors can show up at runtime 🔵 TypeScript ✔ Type safety ✔ Better tooling & autocompletion ✔ Catches errors early (before running code) 💡 In short: JavaScript = Fast & flexible TypeScript = Safe & scalable 👉 If you’re building small projects, JavaScript works great. 👉 For large applications, TypeScript is a game changer. 💬 What do you use in your projects — JS or TS? #JavaScript #TypeScript #React #Frontend #Programming #SoftwareEngineering
To view or add a comment, sign in
-
-
JavaScript scoping still breaks more code than people admit. Not because developers don’t know syntax. Because they assume var behaves like let. It doesn’t. let / const → block scope var → function scope That tiny difference still causes: - hidden bugs - confusing loops - unexpected values in legacy code If you work with older JavaScript codebases, this still matters a lot. Do you still see var in production code or is it finally gone? 👇 #javascript #frontend #webdevelopment #reactjs #coding
To view or add a comment, sign in
-
-
A quick look at some powerful TypeScript features: • Generics (with constraints) • Conditional & Mapped Types • typeof & keyof These concepts make it easier to write flexible, reusable, and maintainable TS code. Code 👇 https://lnkd.in/gDsycMSS Sharing a few simple examples in the slides 👇 #TypeScript #WebDevelopment #JavaScript JavaScript Mastery
To view or add a comment, sign in
-
JavaScript Promise chaining vs async/await: Promise chains: → Harder to read → Error handling complex → Callback-ish Async/await: → Reads like sync code → try/catch works naturally → Easier debugging The choice is obvious. #JavaScript #AsyncJS #CleanCode
To view or add a comment, sign in
-
Just published a new blog on Template Literals in JavaScript! If you're still using old string concatenation, you're missing out on cleaner and more powerful ways to write code. In this blog, I’ve explained how template literals make your JavaScript more readable and dynamic with real examples. 💡 Learn how to: Embed expressions easily Write multi-line strings effortlessly Improve code readability Check it out here 👇 https://lnkd.in/dXZMq4RW #JavaScript #WebDevelopment #Coding #Frontend #100DaysOfCode
To view or add a comment, sign in
-
-
TypeScript is not just "JavaScript with types". The more I use it, the more I feel types are design notes that the compiler can actually check. A bad type usually means one of three things: - I do not understand the data yet - The API contract is weak - I am mixing too many responsibilities in one place Today I refactored a response type from a loose object into a clear union: success response error response validation response The code immediately became easier to read. Good TypeScript is not about writing complex generics everywhere. It is about making impossible states harder to represent. That is the kind of code clients and teams can trust. #TypeScript #JavaScript #CleanCode
To view or add a comment, sign in
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
https://dev.to/jacobandrewsky/flexible-code-without-losing-type-safety-with-ts-generics-1pem