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
With compiler options "declaration": true and "removeComments": true, the emitted .d.ts is currently stripped of comments.
I'd like to propose .d.ts files always be emitted with comments.
Since .d.ts files are important for documentation purposes only, and since file-size is of no concern, I believe there is no meaningful use-case for stripping the documentation from the emitted file.
Alternatively, a new compiler option "removeDeclarationComments" could be introduced, and should default to true - in the marginal case where somebody does want an uncommented .d.ts, this would still be possible, although, personally, I can't think of any use-case.
Note that the current behavior leads to production build scripts, in which we need to run the compiler twice - first with "declaration": false, "removeComments": true for the actual code, and then again with "declaration": true, "removeComments": false for the .d.ts file.
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
With compiler options
"declaration": true
and"removeComments": true
, the emitted.d.ts
is currently stripped of comments.I'd like to propose
.d.ts
files always be emitted with comments.Since
.d.ts
files are important for documentation purposes only, and since file-size is of no concern, I believe there is no meaningful use-case for stripping the documentation from the emitted file.Alternatively, a new compiler option
"removeDeclarationComments"
could be introduced, and should default totrue
- in the marginal case where somebody does want an uncommented.d.ts
, this would still be possible, although, personally, I can't think of any use-case.Note that the current behavior leads to production build scripts, in which we need to run the compiler twice - first with
"declaration": false, "removeComments": true
for the actual code, and then again with"declaration": true, "removeComments": false
for the.d.ts
file.The text was updated successfully, but these errors were encountered: