Reputation: 5609
I have an angular 2 project on vsCode which I had to modify manually on disk. For some reason now the "problems" tab isn't updating and showing the new problems.
Any way we can tell it to manually recheck the files on disk for error?
Upvotes: 2
Views: 2274
Reputation: 776
When you open your solution in VSCode hit Ctrl + Shift + B
to attempt a build, with no build configured it will ask you to configure a build task, in the dropdown select typescript watch mode.
Alternatively you can get tho the dropdown by hitting Ctrl + Shift + p
and typing configure task runner
It will create a .vscode folder in the root of the folder you have open in VSCode and add a tasks.json
file with the contents:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": [
"-w",
"-p",
"."
],
"showOutput": "silent",
"isBackground": true,
"isBuildCommand": true,
"problemMatcher": "$tsc-watch"
}
If your application is a cli application you may need to change the third argument in "args"
from "."
to "./src"
to change where it looks for your typescript config/application
Upvotes: 4