Skip to content

Commit fd8a0a0

Browse files
committed
pr feedback
1 parent 624093f commit fd8a0a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

decisions/0012-type-inference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ There are three major aspects to typesafety in a framework like React Router:
5050

5151
Unlike the `useParams` generic, this isn't just a type cast.
5252
The `useLoaderData` generic ensures that types account for serialization across the network.
53-
However, it still requires you to type of `typeof loader` every time.
53+
However, it still requires you to add `typeof loader` every time.
5454

5555
Not only that, but complex routes get very tricky to type correctly.
5656

@@ -188,12 +188,12 @@ import * as Types from "./+types.product-details";
188188
```
189189

190190
TypeScript will even give you import autocompletion for the typegen file and the `+` prefix helps to distinguish it as a special file.
191-
Big thanks to Svelte Kit for showing us that `rootDirs` trick!
191+
Big thanks to Svelte Kit for showing us that [`rootDirs` trick](https://svelte.dev/blog/zero-config-type-safety#virtual-files)!
192192

193193
### TypeScript plugin
194194

195-
Typegen gets a bad rap because its a hassle when typegen'd files are out-of-date.
196-
Most typegen solutions require you to then rerun a script to update the typegen'd files.
195+
Typegen solutions often receive criticism due to typegen'd files becoming out of sync during development.
196+
This happens because many typegen solutions require you to then rerun a script to update the typegen'd files.
197197

198198
Instead, our typegen will automatically run within a TypeScript plugin.
199199
That means you should never need to manually run a typegen command during development.

0 commit comments

Comments
 (0)