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 have their methods and values duplicated. For example,
const Foo = {
foo() {
console.log("Foo");
}
}
gets converted to
declare namespace Foo {
function foo(): void;
function foo(): void;
}
instead of
declare namespace Foo {
function foo(): void;
}
Not exactly sure what is causing this issue and how to get about solving it. Any help would be much appreciated.