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
Creates a doc page like this that includes the quotation marks (which looks somewhat alright as the page title, but strange in the left sidebar)
Related
I also noticed --plugin typedoc-plugin-merge-modules seems to fail to merge modules declared in that way. After a quick look, the reason seems to be that TypeDoc creates a project with one child for each module, but the Reflection.kind is Namespace, not Module, and the plugin only picks up modules.
I've read #1301 (comment), which says that module Foo { } is the same as namespace Foo { }. But declare module Foo {} does not seem to be the same as declare module "Foo" {} (note the quotation marks). The former produces a warning that the syntax is outdated and one should use namespace instead, the latter does not produce such a warning.
So I wonder if declare module "Foo" {} should really be considered a namespace, not a module?
Environment
Typedoc version: 0.27.0-beta.1
TypeScript version: 5.6.3
Node.js version: v20.18.0
OS: Linux 6.8.0-35-generic #35-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
TypeDoc probably should be creating modules here... How I despise module augmentations...
I should note that TypeDoc does not have the concept of a folder in its model structure. The illusion of folders in the navigation output was added to make the output nicer for people who insist on creating documentation for applications.
edit: Just saw you already fixed it, that was quick 👍
How I despise module augmentations...
I sometimes feel this way about the web ecosystem in general... TypeScript is also more flexible than say, Java, which I think makes generating good documentation much harder. In Java you just generate the docs without any customization and you're done.
I should note that TypeDoc does not have the concept of a folder in its model structure. The illusion of folders in the navigation output was added to make the output nicer for people who insist on creating documentation for applications.
Thanks for the info, that was a bit confusing to me at first. Especially since I didn't understand the need for folders -- but since there are none, that's fine : )
Search terms
declare module namespace name quote quotation marks
Expected Behavior
When declaring modules via
declare module "foo/bar1"
, I'd expect the module to be namedbar1
, in the sub folderfoo
.Actual Behavior
TypeDoc creates a folder
"foo
and names the modulebar1"
.Steps to reproduce the bug
Let's say you have the following file with a few declared modules:
Running
Creates a doc page like this that includes the quotation marks (which looks somewhat alright as the page title, but strange in the left sidebar)
Related
I also noticed
--plugin typedoc-plugin-merge-modules
seems to fail to merge modules declared in that way. After a quick look, the reason seems to be that TypeDoc creates a project with one child for each module, but theReflection.kind
isNamespace
, notModule
, and the plugin only picks up modules.I've read #1301 (comment), which says that
module Foo { }
is the same asnamespace Foo { }
. Butdeclare module Foo {}
does not seem to be the same asdeclare module "Foo" {}
(note the quotation marks). The former produces a warning that the syntax is outdated and one should usenamespace
instead, the latter does not produce such a warning.So I wonder if
declare module "Foo" {}
should really be considered a namespace, not a module?Environment
6.8.0-35-generic #35-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: