<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon" -->

---
title: 50 TypeScript F*ck Ups (I’ve Made So You Don’t Have To)
description: A comprehensive guide covering 50 common TypeScript mistakes and anti-patterns, from basic misuses like relying on 'any' and ignoring strict mode, to advanced...
canonical: https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 50 TypeScript F*ck Ups (I’ve Made So You Don’t Have To) | daily.dev
og:description: A comprehensive guide covering 50 common TypeScript mistakes and anti-patterns, from basic misuses like relying on 'any' and ignoring strict mode, to advanced...
og:url: https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon
og:image: https://api.daily.dev/og/posts/Dd5asXaON.png
og:image:alt: 50 TypeScript F*ck Ups (I’ve Made So You Don’t Have To)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 50 TypeScript F*ck Ups (I’ve Made So You Don’t Have To)

**[Medium](https://daily.dev/sources/medium_js)** · [@devahmadbilal](https://daily.dev/devahmadbilal) · 9 min read · 113 upvotes · 8 comments

## Summary

A comprehensive guide covering 50 common TypeScript mistakes and anti-patterns, from basic misuses like relying on 'any' and ignoring strict mode, to advanced pitfalls with generics, async operations, and type system features. Each mistake includes practical examples and actionable solutions, emphasizing proper use of type guards, utility types, discriminated unions, and runtime validation. The guide stresses that TypeScript is a modeling tool requiring deliberate type design, not just a stricter linter.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://javascript.plainenglish.io/50-typescript-f-ck-ups-ive-made-so-you-don-t-have-to-1de084e1260c>

## Community discussion

Top comments from developers on daily.dev.

**@jrmemeichelbeck** · 9 upvotes

> > 4. Confusing undefined and null
> > They’re not the same. undefined = not assigned. null = intentionally empty.
> Mixing them makes your type guards cry.
>
> > ✅ Takeaway: Pick one convention and stick to it. Prefer undefined in modern code.
>
> This does not make any sense. If they're are not the same thing (they are not), then use the one that you need at that time.
>
> Also there's nothing "modern" in using `undefined` over `null`

**@jzambrano12** · 2 upvotes

> "7. Using var in 2025
> If you’re still using var, I hope you’re also using IE6."
>
> This made my day the happiest 🤣

**@andradei** · 1 upvotes

> As if putting a convoluted type system on top of a crazy language was a good idea to begin with.
>
> Jokes aside, the most annoying thing with typescript is the silent runtime failures on certain cases like circular dependencies.

**@lukashirt** · 0 upvotes

> I would suggest going a bit deeper in the suggestions. Some of them would deserve a bit more explanation for someone less experienced in ts. Maybe something like bad vs. good examples would also help.

## Similar posts on daily.dev

- [20 Mistakes That Quietly Destroy JavaScript/TypeScript Codebases \(Part 1\)](https://daily.dev/posts/20-mistakes-that-quietly-destroy-javascript-typescript-codebases-part-1--n6okeimrf) · The T-Shaped Dev · 6 upvotes · 0 comments
- [Beyond the basics: 21 TypeScript features you might not know about](https://daily.dev/posts/beyond-the-basics-21-typescript-features-you-might-not-know-about-oivxxtrie) · DEV · 27 upvotes · 0 comments
- [How to ensure your expert C\# knowledge doesn’t make you a TypeScript noob](https://daily.dev/posts/how-to-ensure-your-expert-c-knowledge-doesn-t-make-you-a-typescript-noob-i2so3iqfa) · LogRocket · 2 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#typescript](https://daily.dev/tags/typescript)

[View this post on daily.dev](https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"50 TypeScript F*ck Ups (I’ve Made So You Don’t Have To)","url":"https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon"},"datePublished":"2025-10-29T07:36:25.894Z","dateModified":"2025-10-29T07:36:48.667Z","description":"A comprehensive guide covering 50 common TypeScript mistakes and anti-patterns, from basic misuses like relying on 'any' and ignoring strict mode, to advanced...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1caabaf7df477d726353bc7a7c9f3333?_a=AQAEulh","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1caabaf7df477d726353bc7a7c9f3333?_a=AQAEulh","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Ahmad Bilal","url":"https://daily.dev/devahmadbilal","image":"https://lh3.googleusercontent.com/a/ACg8ocIE_V-T-WpK24D9WTqnHIgr4egX10ci0mQs90b_ZMoQxl2lwo8t=s96-c","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":80}},"commentCount":8,"discussionUrl":"https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":113},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":8}],"keywords":"javascript,typescript","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"50 TypeScript F*ck Ups (I’ve Made So You Don’t Have To)"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon","comment":[{"@type":"Comment","text":"Confusing undefined and null\nThey’re not the same. undefined = not assigned. null = intentionally empty.\nMixing them makes your type guards cry.\n\n\n\n✅ Takeaway: Pick one convention and stick to it. Prefer undefined in modern code.\n\nThis does not make any sense. If they’re are not the same thing (they are not), then use the one that you need at that time.\nAlso there’s nothing “modern” in using undefined over null","datePublished":"2025-11-10T10:41:11.891Z","url":"https://daily.dev/posts/Dd5asXaON#c-GlDZNpjI5","author":{"@type":"Person","name":"Jérôme Meichelbeck","url":"https://daily.dev/jrmemeichelbeck","image":"https://media.daily.dev/image/upload/s--JY0uVUtQ--/f_auto/v1727947731/avatars/avatar_BSQRVgqqRVVoABG3XWfb4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9}},{"@type":"Comment","text":"“7. Using var in 2025\nIf you’re still using var, I hope you’re also using IE6.”\nThis made my day the happiest 🤣","datePublished":"2026-01-15T11:29:54.686Z","url":"https://daily.dev/posts/Dd5asXaON#c-RUo2ugyCx","author":{"@type":"Person","name":"Jorge Zambrano","url":"https://daily.dev/jzambrano12","image":"https://lh3.googleusercontent.com/a/ACg8ocK_tQEo3QH-kuMx0nmQl4rxd9S53zc5m3h7ko6KwBOuU69H9oKTig=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"As if putting a convoluted type system on top of a crazy language was a good idea to begin with.\nJokes aside, the most annoying thing with typescript is the silent runtime failures on certain cases like circular dependencies.","datePublished":"2025-12-13T22:42:59.106Z","url":"https://daily.dev/posts/Dd5asXaON#c-FZ7tEvsaY","author":{"@type":"Person","name":"Isaac de Andrade","url":"https://daily.dev/andradei","image":"https://avatars.githubusercontent.com/u/2653546?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"I would suggest going a bit deeper in the suggestions. Some of them would deserve a bit more explanation for someone less experienced in ts. Maybe something like bad vs. good examples would also help.","datePublished":"2025-12-02T20:48:00.393Z","url":"https://daily.dev/posts/Dd5asXaON#c-b8zBp4XhJ","author":{"@type":"Person","name":"Lukas","url":"https://daily.dev/lukashirt","image":"https://avatars.githubusercontent.com/u/25989331?v=4"}}]}
```

