Skip to content

Commit d5dd83d

Browse files
authored
fix: add order of module docs vs. readme (#882)
This is a very minor edit, but should clarify the specific order of the `@module` tag in JSDoc module comments. (_as previously discussed with @crowlKats in the [Discord channel](https://discord.com/channels/1308846349051232306/1308846349747355680/1318895630734852166)_)
1 parent 0e218a1 commit d5dd83d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

frontend/docs/writing-docs.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Not just symbols can be documented. Modules can also be documented. This is
134134
useful to give an overview of the module and its exported symbols.
135135

136136
To document a module, add a JSDoc comment at the top of the module file, and
137-
include the `@module` tag anywhere in the comment:
137+
include the `@module` tag after the description:
138138

139139
```diff
140140
+ /**
@@ -153,8 +153,6 @@ You can also include examples in module documentation:
153153

154154
````diff
155155
/**
156-
* @module
157-
*
158156
* This module contains functions to search the database.
159157
*
160158
+ * @example
@@ -163,5 +161,11 @@ You can also include examples in module documentation:
163161
+ *
164162
+ * search("Alan") // ["Alan Turing", "Alan Kay", ...]
165163
+ * ```
164+
*
165+
* @module
166166
*/
167167
````
168+
169+
If a default entrypoint has a module documentation, it takes precedence over the
170+
README file in the "Overview" tab of the package page.
171+
[Learn more in the documentation section for packages](/docs/packages#documentation).

0 commit comments

Comments
 (0)