From f55a1cc0c6c1a12e6ff7d7f69c6b9c15783fce8a Mon Sep 17 00:00:00 2001 From: Alex / KATT Date: Mon, 30 Dec 2024 02:14:06 +0100 Subject: [PATCH] chore: add vscode settings to faq (#6350) --- www/docs/further/faq.mdx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/www/docs/further/faq.mdx b/www/docs/further/faq.mdx index 514d832e46c..ba008ed2779 100644 --- a/www/docs/further/faq.mdx +++ b/www/docs/further/faq.mdx @@ -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).