File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ There are three major aspects to typesafety in a framework like React Router:
50
50
51
51
Unlike the ` useParams ` generic, this isn't just a type cast.
52
52
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.
54
54
55
55
Not only that, but complex routes get very tricky to type correctly.
56
56
@@ -188,12 +188,12 @@ import * as Types from "./+types.product-details";
188
188
```
189
189
190
190
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 ) !
192
192
193
193
### TypeScript plugin
194
194
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.
197
197
198
198
Instead, our typegen will automatically run within a TypeScript plugin.
199
199
That means you should never need to manually run a typegen command during development.
You can’t perform that action at this time.
0 commit comments