programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
codeinabox to TypeScriptEnglish · 2 months ago

Rust-like Error Handling in TypeScript

codeinput.com

external-link
message-square
1
link
fedilink
  • cross-posted to:
  • [email protected]
4
external-link

Rust-like Error Handling in TypeScript

codeinput.com

codeinabox to TypeScriptEnglish · 2 months ago
message-square
1
link
fedilink
  • cross-posted to:
  • [email protected]
Rust-like Error Handling in TypeScript | Blog | Code Input
codeinput.com
external-link
An overview of how to replicate Rust Result type ergonomics in TypeScript using neverthrow, covering custom error types, and result chaining with safeTry.

cross-posted from: https://lemmy.bestiver.se/post/976989

Comments

alert-triangle
You must log in or # to comment.
  • ultimate_worrier@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    deleted by creator

    • bitcrafter
      link
      fedilink
      arrow-up
      3
      ·
      2 months ago

      Whoever does not understand Monads is doomed to reinvent them.

TypeScript

typescript

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 7 users / week
  • 50 users / month
  • 93 users / 6 months
  • 383 local subscribers
  • 1.1K subscribers
  • 108 Posts
  • 96 Comments
  • Modlog
  • mods:
  • snowe
  • Thomas@lemmy.douwes.co.uk
  • Ategon
  • BE: 0.19.18
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org