Skip to content

Commit 9e360ea

Browse files
committed
Docs: Added a hint on documenting .proto files for static code
1 parent c280a4a commit 9e360ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ protobuf.load("bundle.json", function(err, root) {
307307
});
308308
```
309309

310+
**ProTip!** Documenting your .proto files with `/** ... */`-blocks translates to generated static code.
311+
310312
### Generating TypeScript definitions from static modules
311313

312314
Likewise, the `pbts` command line utility can be used to generate TypeScript definitions from `pbjs`-generated static modules.

tests/data/comments.proto

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ message Test2 {
3030
*/
3131
enum Test3 {
3232

33-
/**
34-
* Value with a comment.
35-
*/
33+
/** Value with a comment. */
3634
ONE = 1;
3735

3836
// Value with no comment.

0 commit comments

Comments
 (0)