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
I have a file mminit.ts which defines a bunch of variables on the Window object. The name mminit is quite cryptic, and I'd like to rename it something like Window or DOMExtensions. I have a comment with the tag /** @module DOMExtensions */ at the top of the file, but it does nothing.
Is there a way to make the file show up in the documentation with a custom name other than mminit?
I could probably jury-rig it with a janky solution via a plugin, but I'd like to see if there's a built-in way first. I can't find anything in the documentation that seems to work, though.
The text was updated successfully, but these errors were encountered:
@Gerrit0 Apologies for missing your reply. It took me a while to get back to this.
I just checked putting /** @module <module name> */ at the top of one of our project's ESM files and it did work, but unfortunately mminit is one of the few files which are actually global scope; and it looks like the @module trick doesn't work for globally scoped scripts.
It is dawning on me now why that is the case - since it being global scope by definition makes it not a module. That being said, it would still be helpful to rename all the scripts from that file, because having mminit in the list of modules in our api docs is extremely unclear. Is there a potential workaround?
Hmm, yeah, global files are a problem. They don't get a symbol, so comment discovery doesn't find any comments for them. They're the only thing reflection like this... there's probably a not completely terrible way of discovering comments for "global modules"...
Search terms
rename, module, file, namespace
Question
Hi,
I have a file
mminit.ts
which defines a bunch of variables on the Window object. The namemminit
is quite cryptic, and I'd like to rename it something likeWindow
orDOMExtensions
. I have a comment with the tag/** @module DOMExtensions */
at the top of the file, but it does nothing.Is there a way to make the file show up in the documentation with a custom name other than
mminit
?I could probably jury-rig it with a janky solution via a plugin, but I'd like to see if there's a built-in way first. I can't find anything in the documentation that seems to work, though.
The text was updated successfully, but these errors were encountered: