From d5973e0fdd3397504a4f9d5452f47043e532f97c Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Wed, 8 Jan 2025 18:02:13 -0700 Subject: [PATCH] Elsewhere: fix installation instructions for True Myth 8.2 --- ...yth v8.2.0\342\200\224Now With a Task Type.md" | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git "a/site/elsewhere/True Myth v8.2.0\342\200\224Now With a Task Type.md" "b/site/elsewhere/True Myth v8.2.0\342\200\224Now With a Task Type.md" index 2714a1e4..0768d939 100644 --- "a/site/elsewhere/True Myth v8.2.0\342\200\224Now With a Task Type.md" +++ "b/site/elsewhere/True Myth v8.2.0\342\200\224Now With a Task Type.md" @@ -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 @@ -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 @@ -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 Rust’s futures vs. TypeScript’s promise API—which I have spent a *lot* of time thinking about courtesy of literally writing the chapter on async in The Rust Programming Language book. But syntactically, that trailing `.await` cleans up a lot and I miss it whenever I go back to TypeScript from Rust! \ No newline at end of file + There are other tradeoffs in play in Rust’s futures vs. TypeScript’s promise API—which I have spent a *lot* of time thinking about courtesy of literally writing the chapter on async in The Rust Programming Language book. But syntactically, that trailing `.await` cleans up a lot and I miss it whenever I go back to TypeScript from Rust!