---
title: "#typescript-best-practices articles | Hashnode"
description: "Explore 9 articles tagged #typescript-best-practices on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/typescript-best-practices"
---

Tag

# #typescript-best-practices

9 posts · 1 followers

[xiangc](https://hashnode.com/@xiangc) · [Nov 3](https://hashnode.com/posts/why-we-ditched-a-30mb-ai-model-and-built-a-2-5ms-canvas-snapper-in-typescript/6ae94c720badff8bbde4dc3e)

### [Why We Ditched a 30MB AI Model and Built a <2.5ms Canvas Snapper in TypeScript](https://tumio.hashnode.dev/why-we-ditched-a-30mb-ai-model-and-built-a-2-5ms-canvas-snapper-in-typescript?utm_source=hashnode&utm_medium=feed)

How we replaced a 30MB Segment-Anything model with 200 lines of classical TypeScript, achieving <2.5ms canvas element-snapping with zero dependencies.

4 min read · [tumio.hashnode.dev](https://tumio.hashnode.dev/why-we-ditched-a-30mb-ai-model-and-built-a-2-5ms-canvas-snapper-in-typescript?utm_source=hashnode&utm_medium=feed)

[Yashika Agrawal](https://hashnode.com/@Yashika29) · [Aug 14](https://hashnode.com/posts/modeling-real-world-data-with-typescript/6a7f46a4a61abec651db083f)

### [Modeling Real-World Data with TypeScript](https://yashika29.hashnode.dev/modeling-real-world-data-with-typescript?utm_source=hashnode&utm_medium=feed)

Learn how TypeScript models real-world data using interfaces, unions, generics, classes, declaration files, and React with practical examples.

18 min read · [yashika29.hashnode.dev](https://yashika29.hashnode.dev/modeling-real-world-data-with-typescript?utm_source=hashnode&utm_medium=feed)

[Siva Bharathy](https://hashnode.com/@gotocva) · [Dec 16, 2025](https://hashnode.com/posts/typescript-control-flow-analysis-a-practical-guide-for-everyday-code/694159b8e0d9263b09815192)

### [TypeScript Control Flow Analysis: A Practical Guide for Everyday Code](https://voiceofdev.in/typescript-control-flow-analysis-a-practical-guide-for-everyday-code?utm_source=hashnode&utm_medium=feed)

Learn how TypeScript Control Flow Analysis narrows types using if statements, type guards, discriminated unions, and assertions with real-world examples.

5 min read · [voiceofdev.in](https://voiceofdev.in/typescript-control-flow-analysis-a-practical-guide-for-everyday-code?utm_source=hashnode&utm_medium=feed)

[Tuan Tran Van](https://hashnode.com/@tuanhadev) · [Oct 26, 2024](https://hashnode.com/posts/mastering-typescript/671cca447880615f62916d8c)

### [🔥TypeScript Handbook](https://tuanhadev.hashnode.dev/mastering-typescript?utm_source=hashnode&utm_medium=feed)

Discover advanced TypeScript concepts and best practices to write clean, maintainable code. Ideal for both beginners and experienced developers

90 min read · [tuanhadev.hashnode.dev](https://tuanhadev.hashnode.dev/mastering-typescript?utm_source=hashnode&utm_medium=feed)

[Akshat Soni](https://hashnode.com/@akshatsoni26) · [Aug 25, 2024](https://hashnode.com/posts/single-vs-double-bars-in-typescript-a-key-comparison/66cadee18cf05242c043e7ef)

### [Single vs Double Bars in TypeScript: A Key Comparison](https://akshatsoni.hashnode.dev/single-vs-double-bars-in-typescript-a-key-comparison?utm_source=hashnode&utm_medium=feed)

Understanding the Differences: Single vs Double Bars in TypeScript

2 min read · [akshatsoni.hashnode.dev](https://akshatsoni.hashnode.dev/single-vs-double-bars-in-typescript-a-key-comparison?utm_source=hashnode&utm_medium=feed)

[AARYAN BAJAJ](https://hashnode.com/@AaryanHN) · [Jun 14, 2024](https://hashnode.com/posts/unleashing-the-power-of-generics-in-typescript-a-comprehensive-guide/666bcafdd7dff92d00d09de0)

### [Unleashing the Power of Generics in TypeScript: A Comprehensive Guide](https://aaryan-bajaj-learnings.hashnode.dev/unleashing-the-power-of-generics-in-typescript-a-comprehensive-guide?utm_source=hashnode&utm_medium=feed)

Introduction Imagine a world where you could create functions, interfaces, and classes that work seamlessly with any data type, providing both flexibility and type safety. Welcome to the world of Generics in TypeScript! In this blog, we'll delve i...

3 min read · [aaryan-bajaj-learnings.hashnode.dev](https://aaryan-bajaj-learnings.hashnode.dev/unleashing-the-power-of-generics-in-typescript-a-comprehensive-guide?utm_source=hashnode&utm_medium=feed)

[AARYAN BAJAJ](https://hashnode.com/@AaryanHN) · [Jun 1, 2024](https://hashnode.com/posts/mastering-readonly-and-optional-properties-in-typescript/665aa771a0406619f8c25520)

### [Mastering ReadOnly and Optional Properties in TypeScript](https://aaryan-bajaj-learnings.hashnode.dev/mastering-readonly-and-optional-properties-in-typescript?utm_source=hashnode&utm_medium=feed)

Introduction Imagine having a way to safeguard certain properties in your TypeScript objects from being changed, or optionally including properties only when necessary. TypeScript offers powerful features—Readonly and optional properties—that provi...

3 min read · [aaryan-bajaj-learnings.hashnode.dev](https://aaryan-bajaj-learnings.hashnode.dev/mastering-readonly-and-optional-properties-in-typescript?utm_source=hashnode&utm_medium=feed)

[AARYAN BAJAJ](https://hashnode.com/@AaryanHN) · [May 31, 2024](https://hashnode.com/posts/understanding-type-aliases-in-typescript/665955df555ccdbd28d79e94)

### [Understanding Type Aliases in TypeScript](https://aaryan-bajaj-learnings.hashnode.dev/understanding-type-aliases-in-typescript?utm_source=hashnode&utm_medium=feed)

Introduction Have you ever found yourself writing the same type definition repeatedly in your TypeScript code? It can be tedious and error-prone. TypeScript offers a powerful feature to streamline your code and make it more maintainable: type aliase...

3 min read · [aaryan-bajaj-learnings.hashnode.dev](https://aaryan-bajaj-learnings.hashnode.dev/understanding-type-aliases-in-typescript?utm_source=hashnode&utm_medium=feed)

[1](https://hashnode.com/posts/understanding-type-aliases-in-typescript/665955df555ccdbd28d79e94)

[Yaswanth Gosula](https://hashnode.com/@ygdevelop) · [Jul 8, 2023](https://hashnode.com/posts/mastering-conditional-typescript-properties-a-trick-that-will-make-you-smile/64a98a0415c04bfe531bd470)

### [Mastering Conditional TypeScript Properties: A Trick That Will Make You Smile!](https://yg.hashnode.dev/mastering-conditional-typescript-properties-a-trick-that-will-make-you-smile?utm_source=hashnode&utm_medium=feed)

Discover the power of conditional TypeScript properties and level up your type safety. Learn how to implement this handy trick and enhance your code. Master

3 min read · [yg.hashnode.dev](https://yg.hashnode.dev/mastering-conditional-typescript-properties-a-trick-that-will-make-you-smile?utm_source=hashnode&utm_medium=feed)
