programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
codeinabox to TypeScriptEnglish · 8 days 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 · 8 days 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
    ·
    8 days ago

    deleted by creator

    • bitcrafter
      link
      fedilink
      arrow-up
      3
      ·
      8 days 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
  • 11 users / week
  • 11 users / month
  • 72 users / 6 months
  • 380 local subscribers
  • 1.09K subscribers
  • 100 Posts
  • 94 Comments
  • Modlog
  • mods:
  • snowe
  • Thomas@lemmy.douwes.co.uk
  • Ategon
  • BE: 0.19.13
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org