typedoc
typedoc copied to clipboard
How to mark plain object as namespace ?
Search terms
namespace, const, export, object
Question
A snippet is better than a long explanation :
const BaseNamespace = {
...
};
export const MyNamespace1 = {
...BaseNamespace,
};
export const MyNamespace2 = (function () {
return. {
...BaseNamespace,
};
}();
// I would like MyNamespace1 and MyNamespace2, to be equivalent to "export namespace MyNamespace1 {}";
How can I do that please ? (@namespace tag does not seem supported)
Not currently supported, variables are always conveyed as variables, functions, or enums.
Hi @Gerrit0, this would be a very useful feature in our project. We have a bunch of objects that we want to be treated as namespaces and shown alongside the other actual namespaces. We've tried making them into actual namespaces but it gets really annoying and messy. Thanks!