Skip to content

Commit 315a01b

Browse files
committed
update docusaurus
1 parent 0b21105 commit 315a01b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/src/pages/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Template literal types have many practical use cases, such as defining API endpo
307307

308308
```ts
309309
// ❌ Avoid
310-
const userEndpoint = '/api/usersss'; // Type 'string' - Since typo 'usersss', route doesn't exist and results in runtime error
310+
const userEndpoint = '/api/usersss'; // Type 'string' - Typo 'usersss': the route doesn't exist, leading to a runtime error.
311311
// ✅ Use
312312
type ApiRoute = 'users' | 'posts' | 'comments';
313313
type ApiEndpoint = `/api/${ApiRoute}`; // Type ApiEndpoint = "/api/users" | "/api/posts" | "/api/comments"

0 commit comments

Comments
 (0)