---
title: "Discussion on \"Pattern Matching in TypeScript: Tuples and Records\" | Hashnode"
description: "Discussion on \"Pattern Matching in TypeScript: Tuples and Records\". Bringing the real might of pattern matching to TypeScript"
url: "https://hashnode.com/posts/pattern-matching-in-typescript-tuples-and-records/64c92d51cde8c02bf2306ec7"
---

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

Discussion

# [Pattern Matching in TypeScript: Tuples and Records](https://robgev.hashnode.dev/pattern-matching-in-typescript-tuples-and-records?utm_source=hashnode&utm_medium=feed)

Bringing the real might of pattern matching to TypeScript

Aug 1, 2023 · 12 min read · robgev.hashnode.dev  
Read the article

-   [#functional-programming](https://hashnode.com/tag/functional-programming)
-   [#pattern-matching](https://hashnode.com/tag/pattern-matching)
-   [#ocaml](https://hashnode.com/tag/ocaml)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Robert](https://hashnode.com/@robthespark)

@robthespark · Yerevan, Armenia

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

I talk to computers and make them do things.

I started learning coding at the age of 11 for Informatics Olympiads. My first language was Pascal, but sometimes I needed to code in C. I started to earn money coding since 2016. I still find new things to learn and the computers still amaze me as much as the day I got my first one. I like non-trivial problems and giving solutions to them.

## Responses 5

Markdown supported · ⌘↵ to post

[Phakorn Kiong](https://hashnode.com/@phakorn)

[Aug 21, 2023](https://hashnode.com/posts/pattern-matching-in-typescript-tuples-and-records/64c92d51cde8c02bf2306ec7/comment/64e2ccf0a9a8b9bbc8cf6d73)

Just sharing here, I pretty much like this pattern matching. Using it a lot in my previous place

[github.com/gvergnaud/ts-pattern](https://github.com/gvergnaud/ts-pattern)

Nice write up btw!

[Robert](https://hashnode.com/@robthespark)

[Aug 23, 2023](https://hashnode.com/posts/pattern-matching-in-typescript-tuples-and-records/64c92d51cde8c02bf2306ec7/comment/64e2ccf0a9a8b9bbc8cf6d73#reply-64e5b33c616c74e6b9eb01ea)

Hey, thanks for sharing. The lib looks amazing, I researched to see what implementations are already in the field and this is a great example! I love using Functional Programming libs, in my previous workplace we used Ramda, was fun to work with.

[Alex Barhaey](https://hashnode.com/@alexwrites)

[Aug 3, 2023](https://hashnode.com/posts/pattern-matching-in-typescript-tuples-and-records/64c92d51cde8c02bf2306ec7/comment/64cbc7c9c74babc27576c50d)

TS is great, i am thinking of switching to JS/TS world.

[Mirjabbar Badalov](https://hashnode.com/@Mirishh)

[Aug 1, 2023](https://hashnode.com/posts/pattern-matching-in-typescript-tuples-and-records/64c92d51cde8c02bf2306ec7/comment/64c9554ce5834aa8ddb704e7)

Amazing🏆

[Sandeep Panda](https://hashnode.com/@sandeep)

[Aug 1, 2023](https://hashnode.com/posts/pattern-matching-in-typescript-tuples-and-records/64c92d51cde8c02bf2306ec7/comment/64c94719e11157a5141267fa)

Great content 🙌
