---
title: "Discussion on \"Stop Throwing, Start Returning: Why TypeScript Needs the Result Pattern\" | Hashnode"
description: "Discussion on \"Stop Throwing, Start Returning: Why TypeScript Needs the Result Pattern\". TypeScript's try-catch gives you unknown errors, invisible failure modes, and silent bugs. The Result pattern makes errors typed, visible, and impossible to forget. Here's why you should stop throwing and start returning."
url: "https://hashnode.com/posts/stop-throwing-start-returning-why-typescript-needs-the-result-pattern/69ac520f86766ac3a6d228b8"
---

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

Discussion

# [Stop Throwing, Start Returning: Why TypeScript Needs the Result Pattern](https://hex-di.hashnode.dev/stop-throwing-start-returning-why-typescript-needs-the-result-pattern?utm_source=hashnode&utm_medium=feed)

TypeScript's try-catch gives you unknown errors, invisible failure modes, and silent bugs. The Result pattern makes errors typed, visible, and impossible to forget. Here's why you should stop throwing and start returning.

Mar 7 · 10 min read · hex-di.hashnode.dev  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#error-handling](https://hashnode.com/tag/error-handling)
-   [#result-pattern](https://hashnode.com/tag/result-pattern)
-   [#functional-programming](https://hashnode.com/tag/functional-programming)
-   [#clean-code](https://hashnode.com/tag/clean-code)

## Written by

[Mohammad Almechkor](https://hashnode.com/@medalmechkor)

@medalmechkor · Paris, France

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

I write the spec before the code and let the compiler catch the rest.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
