To hide the original errors, display only the prettified ones, and make type blocks copyable, you can use the following hack:
-
Install the Custom CSS and JS Loader extension from the VSCode marketplace.
-
Follow the installation instructions provided by the extension, and use this CSS file.
Unfortunately, VSCode doesn't currently support formatted diagnostics. Once it does, we'll be able to convert the extension to a TypeScript LSP Plugin that replaces the original error with the prettified version.
For updates on this feature, follow this issue.
VSCode sanitizes and removes most CSS properties for security reasons. We've opened an issue and submitted a PR to allow the use of the display
property. This would enable us to layout the types in a way that allows copying.
Until this change is approved, you can use the hack described above as a workaround.