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. For example,
/**
* Foo namespace
* @namespace
*/
const Foo = {
/** Test function */
foo: function() {},
/** Test property */
bar: 1
}
gets converted to
declare namespace Foo {
function foo(): void;
const bar: number;
}
instead of
/**
* Foo namespace
* @namespace
*/
declare namespace Foo {
/** Test function */
function foo(): void;
/** Test property */
const bar: number;
}
Not exactly sure what is causing this issue and how to get about solving it. Any help would be much appreciated.