From b2fa4158234b2100c7b35065b0be4e0e10559f2d Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Thu, 3 Mar 2022 10:52:26 -0800 Subject: [PATCH] VS Code: specify workspace typescript version Currently the workspace's version is older than VS Code's default. VS Code complains about things that aren't errors according to the workspace. (In particular, typing of catched exceptions has become stricter.) With this setting, you can select the workspace's Typescript version in the VS Code UI so the two are consistent. --- .vscode/settings.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 7913f7c..fc2c87b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -43,5 +43,10 @@ }, "rust-analyzer.inlayHints.enable": false, "markdown.extension.list.indentationSize": "inherit", - "markdown.extension.toc.unorderedList.marker": "*" + "markdown.extension.toc.unorderedList.marker": "*", + + // Specify the path to the workspace version of TypeScript. Note this only + // takes effect when workspace version is selected in the UI. + // https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-the-workspace-version-of-typescript + "typescript.tsdk": "./ui/node_modules/typescript/lib" }