You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue occur when all extensions are disabled?: Yes
VS Code Version: 1.70.0
OS Version: Windows 10.0.19044
Why doesn't TypeScript/Vscode preserve documentation / JSDoc for mapped types?
Using this example that appears in the TypeScript documentation itself, which you can quickly reproduce in Vscode locally, you can see the problem.
It is expected that when remapping the keys of a type object, the documentation would remain what was defined in the original/previous keys, but this does not happen. Nothing is preserved.
This sucks in the development context, because it requires us to have to repeat the documentation of a property or method, for example, in multiple places, thousands of times. This can lead to consistency issues as the code grows and loses the point of automating things.
Another directly related problem is in Index Signatures. Even if documentation is added, nothing is preserved. This also includes Union Types. An example can be seen here.
In addition to this correction, I would also like to ask as an additional resource, if possible, the possibility of modifying the documentation during the "remapping" step. It could be something like using template literals.
P.s. I opened the issue in both places because I'm not sure if the source of the problem is in Vscode or TypeScript, or both.
The text was updated successfully, but these errors were encountered:
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.71.0. Please try upgrading to the latest version and checking whether this issue remains.
Does this issue occur when all extensions are disabled?: Yes
Why doesn't TypeScript/Vscode preserve documentation / JSDoc for mapped types?
Using this example that appears in the TypeScript documentation itself, which you can quickly reproduce in Vscode locally, you can see the problem.
It is expected that when remapping the keys of a type object, the documentation would remain what was defined in the original/previous keys, but this does not happen. Nothing is preserved.
This sucks in the development context, because it requires us to have to repeat the documentation of a property or method, for example, in multiple places, thousands of times. This can lead to consistency issues as the code grows and loses the point of automating things.
Another directly related problem is in Index Signatures. Even if documentation is added, nothing is preserved. This also includes Union Types. An example can be seen here.
In addition to this correction, I would also like to ask as an additional resource, if possible, the possibility of modifying the documentation during the "remapping" step. It could be something like using template literals.
P.s. I opened the issue in both places because I'm not sure if the source of the problem is in Vscode or TypeScript, or both.
The text was updated successfully, but these errors were encountered: