<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/type-narrowing-in-typescript-ljhybguro" -->

---
title: Type Narrowing in TypeScript | daily.dev
description: A practical guide to TypeScript type narrowing covering multiple techniques: typeof type guards, truthiness narrowing, equality narrowing, discriminated...
canonical: https://daily.dev/posts/type-narrowing-in-typescript-ljhybguro
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Type Narrowing in TypeScript | daily.dev
og:description: A practical guide to TypeScript type narrowing covering multiple techniques: typeof type guards, truthiness narrowing, equality narrowing, discriminated...
og:url: https://daily.dev/posts/type-narrowing-in-typescript-ljhybguro
og:image: https://api.daily.dev/og/posts/LJHYbgURo.png
og:image:alt: Type Narrowing in TypeScript
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.

# Type Narrowing in TypeScript

**[Playful Programming](https://daily.dev/sources/playfulprogramming)** · [@mainawycliffe](https://daily.dev/mainawycliffe) · 8 min read · 0 upvotes · 0 comments

## Summary

A practical guide to TypeScript type narrowing covering multiple techniques: typeof type guards, truthiness narrowing, equality narrowing, discriminated unions, the 'in' operator, assignment narrowing, and instanceof checks. Each technique is explained with concrete code examples showing how TypeScript infers more precise types within conditional branches.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://playfulprogramming.com/posts/type-narrowing-in-typescript-3bdp>

## Similar posts on daily.dev

- [Visual Types](https://daily.dev/posts/visual-types-yqneyg40x) · Lobsters · 5 upvotes · 0 comments
- [TypeScript Discriminated Unions: Safe Narrowing and Checks](https://daily.dev/posts/typescript-discriminated-unions-safe-narrowing-and-checks-bywqozkte) · SitePoint · 8 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

---

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

[View this post on daily.dev](https://daily.dev/posts/type-narrowing-in-typescript-ljhybguro)

```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":"Type Narrowing in TypeScript","url":"https://daily.dev/posts/type-narrowing-in-typescript-ljhybguro","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/type-narrowing-in-typescript-ljhybguro"},"datePublished":"2026-03-16T21:47:38.387Z","dateModified":"2026-03-17T18:01:45.851Z","description":"A practical guide to TypeScript type narrowing covering multiple techniques: typeof type guards, truthiness narrowing, equality narrowing, discriminated...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/071ba8ae54bf6288b25d82522a26e6fb?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/071ba8ae54bf6288b25d82522a26e6fb?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Playful Programming","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":"Maina Wycliffe","url":"https://daily.dev/mainawycliffe","image":"https://lh3.googleusercontent.com/a-/AOh14GixkCfcFRGynHA6Q1do3acrQ2SJInlspCdn2KXZWw=s100","description":"Web Developer and Google Developer Expert","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":50}},"commentCount":0,"discussionUrl":"https://daily.dev/posts/type-narrowing-in-typescript-ljhybguro","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,typescript","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Playful Programming","item":"https://daily.dev/sources/playfulprogramming"},{"@type":"ListItem","position":3,"name":"Type Narrowing in TypeScript"}]}
```

