Task: Typescript errors disappear after document closed
See original GitHub issue- VSCode Version: 1.22.1 (newest) (typescript 2.8.1)
- OS Version: Windows 10 64bit
I expect typescript errors from all files to show until they have been fixed.
Instead, they disappear as soon as the document is closed again (e.g. by randomly clicking on the error list, which causes documents to open & close again)
Steps to Reproduce:
- Use this tasks.json (check if the project path fits you first)
{
"version": "2.0.0",
"command": "tsc",
"isShellCommand": true,
"args": [
"-w",
"-p",
"."
],
"showOutput": "silent",
"isBackground": true,
"problemMatcher": {
"base": "$tsc-watch",
// "owner": "typescript",
// "applyTo": "allDocuments"
}
}
- Start the task
- Errors will show in error list (hopefully, if there are errors at all)
- Randomly click between errors of different files in error list. The files will open and close automatically (if they are not pinned). When a file closes, it’s errors disappear!
What I have tried:
- $tsc-watch matcher without any other options
- owner property “typescript” or something artificial
- applyTo property all possibilities
- in settings: typescript.validate.enable === false
The “best” in my trial and error endevour I have got was that the errors just persisted, even when fixed, lol 😃
My user settings (don’t have workspace settings)
{
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"editor.wordWrap": "on",
"explorer.confirmDelete": false,
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
},
"editor.autoClosingBrackets": false,
"explorer.confirmDragAndDrop": false,
"editor.acceptSuggestionOnCommitCharacter": false,
"window.zoomLevel": 0,
"explorer.autoReveal": true,
"editor.suggestOnTriggerCharacters": true,
"editor.acceptSuggestionOnEnter": "on",
"editor.parameterHints": true,
"typescript.referencesCodeLens.enabled": false,
// "typescript.validate.enable": false
}
Does this issue occur when all extensions are disabled?: Yes
Issue Analytics
- State:
- Created 5 years ago
- Reactions:21
- Comments:19 (11 by maintainers)
Top Results From Across the Web
Typescript errors not showing in VSCode editor using ...
In your VSC's Extensions panel, type "@builtin" and look for "TypeScript and JavaScript Language Features" in the "Features" section.
Read more >Error MSB4062 The "TypeScript.Tasks ...
This issue is read only, because it has been in the Closed - Fixed state for over 90 days. It was closed for...
Read more >TypeScript errors and how to fix them
You have to close the string literal with an ending ' : ... error TS1046: Top-level declarations in .d.ts files must start with...
Read more >Strict mode - JavaScript - MDN Web Docs
Using "use strict" in functions with rest, default, or destructured parameters is a syntax error. function sum(a = 1, b = 2) ...
Read more >Fixes or workarounds for recent issues in Outlook for PC
[INVESTIGATING] Outlook errors marking task complete and sending task ... [FIXED] Something is wrong with one of your data files and Outlook needs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We recently swapped from Flow to TypeScript.
In our previous workflow with Flow, the errors would remain when we opened/closed files.
However, with Typescript, none of the errors show by default (when all files are closed). For this reason, we use VSCode’s Tasks -> Run Build Task, to run the detected tsconfig.watch. This is great because it shows all errors across the project without having to open files.
However, when we open a file then close it, the error disappears from the problems tab (same issue as described above).
We would love for there to be a configuration option to disable removing errors from problems tab until they are fixed. This would be a simple fix. An even cooler one would be for this behaviour to be automatic when using a typescript watcher.
Yes but after you close a file, the errors disappear from the file browser bar and the IDE’s problems summary