Skip to content

Commit f24cfa2

Browse files
committed
FAQ about jsdoc comments
1 parent 91c25b8 commit f24cfa2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

_faq/contrib/jsdoc.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
question: When should I write JSDoc comments? When shouldn't I?
3+
---
4+
5+
JSDoc comments (the ones that start with `/**`) should be used for everything
6+
that's part of the public interface. They should not be used for anything else.
7+
8+
The API reference documentation on this website is automatically generated from
9+
JSDoc comments. So adding a JSDoc comment to something has the effect of making
10+
it part of the documented public API. Do not add JSDoc comments to internal
11+
interfaces. If you want, you can write a comment that looks like JSDoc but
12+
doesn't start with `/**`. But it's usually better to use plain English since
13+
those comments don't need to be machine-readable.

0 commit comments

Comments
 (0)