---
title: "Discussion on \"10 TypeScript Types Every Frontend Dev Should Know\" | Hashnode"
description: "Discussion on \"10 TypeScript Types Every Frontend Dev Should Know\". Most developers use TypeScript like it's JavaScript with extra colons. Here are 10 type features that actually change how safely you write code."
url: "https://hashnode.com/posts/10-typescript-types-every-frontend-dev-should-know/6a91a613417a4f39bb5fa9f9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [10 TypeScript Types Every Frontend Dev Should Know](https://jayesh-sojitra.hashnode.dev/10-typescript-types-every-frontend-dev-should-know?utm_source=hashnode&utm_medium=feed)

Most developers use TypeScript like it's JavaScript with extra colons. Here are 10 type features that actually change how safely you write code.

Aug 28 · 3 min read · jayesh-sojitra.hashnode.dev  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#webdevelopment](https://hashnode.com/tag/webdevelopment)
-   [#frontend](https://hashnode.com/tag/frontend)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#softwareengineering](https://hashnode.com/tag/softwareengineering)
-   [#tsconfig](https://hashnode.com/tag/tsconfig)
-   [#typescript-tips](https://hashnode.com/tag/typescript-tips)
-   [#configuration](https://hashnode.com/tag/configuration)

## Written by

[Jayesh Sojitra](https://hashnode.com/@jayeshsojitra)

@jayeshsojitra

  
[View profile](https://hashnode.com/@jayeshsojitra)

Jayesh Sojitra | AI &amp; Frontend

## Responses 1

Markdown supported · ⌘↵ to post

[Tarun Sharma](https://hashnode.com/@101beardo)

[Aug 30](https://hashnode.com/posts/10-typescript-types-every-frontend-dev-should-know/6a91a613417a4f39bb5fa9f9/comment/6a9431bcfcb06d13587febb7)

Good list. The one thing I would add to the discriminated union point is the exhaustiveness check. A default case that assigns the value to a const of type never turns "I added a new variant and forgot to handle it" from a runtime surprise into a compile error. Without that the union narrows fine but nothing forces you to cover every branch. Also worth flagging that narrowing only works while the discriminant stays a literal type, one spread or a widened assignment upstream and status becomes plain string and the whole thing quietly stops narrowing.
