You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learn/migration-guides/typescript-to-rust/index.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ draft = false
8
8
series = "Migration Guides"
9
9
icon = "typescript.svg"
10
10
resources = [
11
-
"[Syntax comparison between TypeScript to Rust - Robbie Cook](https://blog.robbie.digital/posts/typescript-to-rust)",
11
+
"[Syntax comparison between TypeScript and Rust - Robbie Cook](https://blog.robbie.digital/posts/typescript-to-rust)",
12
12
"[My experience migrating TypeScript libraries to Rust - Patrick Desjardins](https://patrickdesjardins.com/blog/migrating-typescript-library-to-rust)",
13
13
"[Node.js to Rust in 2024 - Pascal Poredda](https://pascal-poredda.de/blog/migrating-from-node-to-rust)"
If you add a new variant to the enum, the compiler will tell you every place that needs updating.
259
-
That's on example why refactoring Rust code is amazing.
259
+
That's one example of why refactoring Rust code is amazing.
260
260
261
261
### Async: `Promise<T>` vs `async fn`
262
262
@@ -391,7 +391,7 @@ You'll see `&str` in most function signatures and `String` in structs and return
391
391
The strict Rust compiler is your strongest ally.
392
392
You can refactor without fear because the compiler has your back.
393
393
394
-
It sound like a cliché, but to truly understand what I mean by that, you have to experience it for yourself.
394
+
It sounds like a cliché, but to truly understand what I mean by that, you have to experience it for yourself.
395
395
You won't deal with `null` or `undefined` errors, but you will end up modeling a lot of your code with strong types and use `Option<T>` and `Result<T, E>` a lot to handle cases that would be runtime errors in TypeScript.
396
396
397
397
## Ecosystem Maturity
@@ -401,7 +401,7 @@ NPM gives you more packages, but Rust's ecosystem is of excellent quality and gr
401
401
> In September 2022 over 2.1 million packages were reported being listed in the npm registry, making it the biggest single language code repository on Earth -- Source: [Nodejs.org](https://nodejs.org/en/learn/getting-started/an-introduction-to-the-npm-package-manager)
402
402
403
403
A small portion of these packages provide type definitions (i.e. TypeScript support).
404
-
Many packages are outdated or are actively maintained.
404
+
Many packages are outdated or are no longer actively maintained.
405
405
According to [SC Media](https://www.scworld.com/news/npm-registry-users-download-2-1b-deprecated-packages-weekly-researchers-say), "NPM registry users download 2.1B deprecated packages weekly".
0 commit comments