---
title: "#discriminated-union-types articles | Hashnode"
description: "Explore 8 articles tagged #discriminated-union-types on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/discriminated-union-types"
---

Tag

# #discriminated-union-types

8 posts · 0 followers

[Ricardo Groß](https://hashnode.com/@codometis) · [Jun 12](https://hashnode.com/posts/stop-modeling-time-with-two-columns-codometis-valueranges-brings-interval-logic-to-your-net-domain/6a2bbb320e2601138bf9ad3e)

### [Stop Modeling Time With Two Columns: CodoMetis.ValueRanges Brings Interval Logic to Your .NET Domain](https://codometis.hashnode.dev/stop-modeling-time-with-two-columns-codometis-valueranges-brings-interval-logic-to-your-net-domain?utm_source=hashnode&utm_medium=feed)

A complete solution: expressive range types in your domain layer, full PostgreSQL translation in your data layer - no compromises at either end

12 min read · [codometis.hashnode.dev](https://codometis.hashnode.dev/stop-modeling-time-with-two-columns-codometis-valueranges-brings-interval-logic-to-your-net-domain?utm_source=hashnode&utm_medium=feed)

[Mark Pro](https://hashnode.com/@mark-pro) · [Sep 10, 2025](https://hashnode.com/posts/nulls-should-be-exceptional/68c208ffc2a14560a56eb31a)

### [Nulls Should Be Exceptional](https://blog.oneiro.dev/nulls-should-be-exceptional?utm_source=hashnode&utm_medium=feed)

Introduction Null reference exceptions are the norm, they are not exceptional. For many developers, handling nothing (null) has become a mundane routine built into the mind's muscle memory. A few "if" statements there, a guard condition here, and yet...

10 min read · [blog.oneiro.dev](https://blog.oneiro.dev/nulls-should-be-exceptional?utm_source=hashnode&utm_medium=feed)

[Mark Pro](https://hashnode.com/@mark-pro) · [Sep 10, 2025](https://hashnode.com/posts/be-expressive-null-handling/68c18ae645e56a973381d956)

### [Be Expressive: Null Handling](https://blog.oneiro.dev/be-expressive-null-handling?utm_source=hashnode&utm_medium=feed)

Null handling in C#

7 min read · [blog.oneiro.dev](https://blog.oneiro.dev/be-expressive-null-handling?utm_source=hashnode&utm_medium=feed)

[Ryan Bell](https://hashnode.com/@shankproof) · [Apr 12, 2025](https://hashnode.com/posts/streamlined-discriminated-union-decoding-in-typescript-with-jsonouss-new-decoder/67f9e4a8245008699bcffe19)

### [Streamlined Discriminated Union Decoding in TypeScript with jsonous's New Decoder](https://shankproof.dev/streamlined-discriminated-union-decoding-in-typescript-with-jsonouss-new-decoder?utm_source=hashnode&utm_medium=feed)

TypeScript developers love discriminated unions (or tagged unions). They provide a fantastic way to model states, events, or different kinds of data structures in a type-safe manner. When working with external data sources like JSON APIs, however, de...

4 min read · [shankproof.dev](https://shankproof.dev/streamlined-discriminated-union-decoding-in-typescript-with-jsonouss-new-decoder?utm_source=hashnode&utm_medium=feed)

[Jindřich Ivánek](https://hashnode.com/@jindraivanek) · [Feb 8, 2024](https://hashnode.com/posts/f-tips-weekly-5-discriminated-union-types/65c47c16f4653d51b494244b)

### [F# tips weekly #5: Discriminated Union Types](https://jindraivanek.hashnode.dev/f-tips-weekly-5-discriminated-union-types?utm_source=hashnode&utm_medium=feed)

This week, we'll look at some interesting details about Discriminated Union types. Tuple vs. Multiple Fields There is a subtle difference between these two cases of Discriminated Union (DU): type DU = | A of int \* string | B of (int \* string...

3 min read · [jindraivanek.hashnode.dev](https://jindraivanek.hashnode.dev/f-tips-weekly-5-discriminated-union-types?utm_source=hashnode&utm_medium=feed)

[Jindřich Ivánek](https://hashnode.com/@jindraivanek) · [Jan 11, 2024](https://hashnode.com/posts/f-tips-weekly-1-single-case-du/659f8fad522c240171ca61ca)

### [F# tips weekly #1: Single case DU](https://jindraivanek.hashnode.dev/f-tips-weekly-1-single-case-du?utm_source=hashnode&utm_medium=feed)

Single-case discriminated unions are a great way to avoid primitive obsession. 💡 Primitive obsession is an anti-pattern where primitive types are used too much in places where a custom type would be a better fit. By using custom types or wrapper ty...

2 min read · [jindraivanek.hashnode.dev](https://jindraivanek.hashnode.dev/f-tips-weekly-1-single-case-du?utm_source=hashnode&utm_medium=feed)

[1](https://hashnode.com/posts/f-tips-weekly-1-single-case-du/659f8fad522c240171ca61ca)

[Abhishek S](https://hashnode.com/@abhishekvash) · [Sep 15, 2023](https://hashnode.com/posts/typescripts-discriminated-unions-and-how-i-began-to-worry-less/650466b4cf4db52fbdaa41bf)

### [TypeScript's Discriminated Unions and How I Began to Worry Less](https://blog.abhishekvash.xyz/typescripts-discriminated-unions-and-how-i-began-to-worry-less?utm_source=hashnode&utm_medium=feed)

A Journey from Type Chaos to Type Safety

3 min read · [blog.abhishekvash.xyz](https://blog.abhishekvash.xyz/typescripts-discriminated-unions-and-how-i-began-to-worry-less?utm_source=hashnode&utm_medium=feed)

[1](https://hashnode.com/posts/typescripts-discriminated-unions-and-how-i-began-to-worry-less/650466b4cf4db52fbdaa41bf)

[Wagner M](https://hashnode.com/@wagnerm) · [Aug 22, 2023](https://hashnode.com/posts/the-magic-of-discriminated-union-types-in-typescript/64e407a5bf2aa972d683f5d6)

### [The Magic of Discriminated Union Types in TypeScript](https://wagnerm.hashnode.dev/the-magic-of-discriminated-union-types-in-typescript?utm_source=hashnode&utm_medium=feed)

How to unlock more robust type-checking and clearer code patterns in your TypeScript projects.

5 min read · [wagnerm.hashnode.dev](https://wagnerm.hashnode.dev/the-magic-of-discriminated-union-types-in-typescript?utm_source=hashnode&utm_medium=feed)
