Skip to content

Commit

Permalink
Elsewhere: fix installation instructions for True Myth 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskrycho committed Jan 9, 2025
1 parent bec9d30 commit d5973e0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions site/elsewhere/True Myth v8.2.0—Now With a Task Type.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image:
cdn: true-myth-v8.2.0.png

date: 2025-01-02T21:15:00-0700
updated: 2025-01-08T18:00:00-0700
updated: 2025-01-08T18:03:00-0700

tags:
- open-source software
Expand All @@ -24,11 +24,12 @@ qualifiers:

The main thing right up front: I just released [True Myth v8.2.0][release], which includes a brand new `Task` type for type safe async code in TypeScript. It’s like a hybrid between `Promise` and `Result`, or *What `Promise` always should have been™*. You can get it by installing it with your favorite package manager:

| Package manager | Command |
| --------------- | ----------------------------- |
| npm | `npm install true-myth@beta` |
| yarn | `yarn add true-myth@beta` |
| pnpm | `pnpm install true-myth@beta` |
| Package manager | Command |
| --------------- | --------------------------- |
| npm | `npm add true-myth@^8.2.0` |
| yarn | `yarn add true-myth@^8.2.0` |
| pnpm | `pnpm add true-myth@^8.2.0` |
| bun | `bun add true-myth@^8.2.0` |

[release]: https://github.com/true-myth/true-myth/releases/tag/v8.2.0

Expand Down Expand Up @@ -81,4 +82,4 @@ None of these will not be especially hard to add or fix, and in fact I already h
let the_value = some_task.await.unwrap_or(a_default_value);
```

There are other tradeoffs in play in Rusts futures vs. TypeScripts promise <abbr>API</abbr>—which I have spent a *lot* of time thinking about courtesy of literally writing the chapter on async in <cite>The Rust Programming Language</cite> book. But syntactically, that trailing `.await` cleans up a lot and I miss it whenever I go back to TypeScript from Rust!
There are other tradeoffs in play in Rusts futures vs. TypeScripts promise <abbr>API</abbr>—which I have spent a *lot* of time thinking about courtesy of literally writing the chapter on async in <cite>The Rust Programming Language</cite> book. But syntactically, that trailing `.await` cleans up a lot and I miss it whenever I go back to TypeScript from Rust!

0 comments on commit d5973e0

Please sign in to comment.