JSDocs comments being removed while autogenerating a .d.ts file for a const JavaScript namespace #46010
Labels
Bug
A bug in TypeScript
Domain: Comment Emit
The issue relates to the emission of comments when compiling
Milestone
Bug Report
I am currently trying to autogenerate .d.ts files for my JavaScript API using --declaration and I am running into problems. All of the files which use a const namespace will have all of their comments removed, including the JSDocs ones. I have set
removeComments
as false in tsconfig and sanity checked it by a class with comments and all of the comments were retained in the class, but not the namespace.🔎 Search Terms
Duplicate methods --declaration
namespace .d.ts bug
🕗 Version & Regression Information
4.4.3
but happens with any4.x.x
version I've tried (haven't tried earlier versions).⏯ Playground Link
The Playground was not playing nicely with emitDeclaration and filenames with .js extension
💻 Code
🙁 Actual behavior
🙂 Expected behavior
The text was updated successfully, but these errors were encountered: