Instantly share code, notes, and snippets.
- Belo Horizonte - Brazil
- 17:22
(UTC -03:00)
rtrampox /CompleteDiscordQuest.md
CreatedDecember 3, 2025 03:54 — forked fromaamiaa/CompleteDiscordQuest.md
Complete Recent Discord Questrtrampox /try-catch.ts
CreatedMarch 21, 2025 16:54 — forked fromt3dotgg/try-catch.ts
Theo's preferred way of handling try/catch in TypeScript This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| // Types for the result object with discriminated union | |
| typeSuccess<T>={ | |
| data:T; | |
| error:null; | |
| }; | |
| typeFailure<E>={ | |
| data:null; | |
| error:E; | |
| }; |