Exclude JavaScript Files from TypeScript Project in VS Code

When working in a TypeScript project, the workspace always contains JavaScript transpiled files.

It kinda pollutes the workspace, IMO.

Here is solution. Put the following settings in .vscode\settings.json

1
2
3
4
5
6
7
8
9
{
"files.exclude": {
"**/.git": true,
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.js.map":true
}
}