Skip to content

Commit 3cb1b7e

Browse files
committed
Updated docs and types [ci skip]
1 parent 1a6fdc9 commit 3cb1b7e

File tree

11 files changed

+54
-17
lines changed

11 files changed

+54
-17
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,15 +336,21 @@ Consolidates imports and converts between file formats.
336336
337337
-o, --out Saves to a file instead of writing to stdout.
338338
339-
-w, --wrap Specifies the wrapper to use for *-module targets. Also accepts a path.
339+
Module targets only:
340+
341+
-w, --wrap Specifies the wrapper to use. Also accepts a path to require a custom wrapper.
340342
341343
default Default wrapper supporting both CommonJS and AMD
342344
commonjs CommonJS only wrapper
343345
amd AMD only wrapper
344346
345-
-r, --root Specifies an alternative protobuf.roots name for *-module targets.
347+
-r, --root Specifies an alternative protobuf.roots name.
348+
349+
Proto sources only:
350+
351+
--keep-case Keeps field casing instead of converting to camel case (not recommended).
346352
347-
Static code generation only:
353+
Static targets only:
348354
349355
--no-encode Does not generate encode functions.
350356
--no-decode Does not generate decode functions.

dist/protobuf.js

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js.gz

0 Bytes
Binary file not shown.

dist/protobuf.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.min.js.gz

-1 Bytes
Binary file not shown.

src/parse.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function lower(token) {
3434
*/
3535

3636
/**
37-
* Options modifying the the behavior of {@link parse}.
37+
* Options modifying the behavior of {@link parse}.
3838
* @typedef ParseOptions
3939
* @type {Object}
4040
* @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case
@@ -43,7 +43,7 @@ function lower(token) {
4343
/**
4444
* Parses the given .proto source and returns an object with the parsed contents.
4545
* @param {string} source Source contents
46-
* @param {Root|ParseOptions} [root] Root to populate
46+
* @param {Root} root Root to populate
4747
* @param {ParseOptions} [options] Parse options
4848
* @returns {ParserResult} Parser result
4949
*/
@@ -552,3 +552,13 @@ function parse(source, root, options) {
552552
root : root
553553
};
554554
}
555+
556+
/**
557+
* Parses the given .proto source and returns an object with the parsed contents.
558+
* @name parse
559+
* @function
560+
* @param {string} source Source contents
561+
* @param {ParseOptions} [options] Parse options
562+
* @returns {ParserResult} Parser result
563+
* @variation 2
564+
*/

0 commit comments

Comments
 (0)