Skip to content

Commit

Permalink
chore: add vscode settings to faq (trpc#6350)
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT authored Dec 30, 2024
1 parent 8650a22 commit f55a1cc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions www/docs/further/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ Feel free to contribute to this page with improvements or create a new discussio
- Make sure you are using the TypeScript-version required by tRPC (`>=5.7.2`)
- Make sure your editor is using the same TypeScript version as your `package.json`

### VSCode settings

Add these settings to your `.vscode/settings.json` in your project root to make sure your editor is using the same TypeScript version as your `package.json`:

```json title=".vscode/settings.json"
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
```

We highly recommend committing this file to your repo so your colleagues also get the same experience.

## How do I make a middleware change the type of my `Context`?

See [Context Extension](/docs/server/middlewares#context-extension).
Expand Down

0 comments on commit f55a1cc

Please sign in to comment.