Permalink
Browse files

Docs: Documented that Type#encode respectively Message.encode do not …

…implicitly .verify, see #696 [ci-skip]
  • Loading branch information...
dcodeIO committed Mar 5, 2017
1 parent e7e123a commit 7502dd2dfdaea111e5c1a902c524ad0a51ff9bd4
Showing with 276 additions and 276 deletions.
  1. +2 −2 cli/targets/static.js
  2. +2 −2 src/type.js
  3. +8 −8 tests/data/comments.js
  4. +4 −4 tests/data/convert.js
  5. +16 −16 tests/data/mapbox/vector_tile.js
  6. +8 −8 tests/data/package.js
  7. +8 −8 tests/data/rpc.js
  8. +228 −228 tests/data/test.js
@@ -393,7 +393,7 @@ function buildType(ref, type) {
if (config.encode) {
push("");
pushComment([
"Encodes the specified " + type.name + " message.",
"Encodes the specified " + type.name + " message. Does not implicitly {@link " + fullName + ".verify|verify} messages.",
"@param {" + fullName + "|Object} " + (config.beautify ? "message" : "m") + " " + type.name + " message or plain object to encode",
"@param {$protobuf.Writer} [" + (config.beautify ? "writer" : "w") + "] Writer to encode to",
"@returns {$protobuf.Writer} Writer"
@@ -403,7 +403,7 @@ function buildType(ref, type) {
if (config.delimited) {
push("");
pushComment([
"Encodes the specified " + type.name + " message, length delimited.",
"Encodes the specified " + type.name + " message, length delimited. Does not implicitly {@link " + fullName + ".verify|verify} messages.",
"@param {" + fullName + "|Object} message " + type.name + " message or plain object to encode",
"@param {$protobuf.Writer} [writer] Writer to encode to",
"@returns {$protobuf.Writer} Writer"
@@ -397,7 +397,7 @@ Type.prototype.setup = function setup() {
};
/**
* Encodes a message of this type.
* Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.
* @param {Message|Object} message Message instance or plain object
* @param {Writer} [writer] Writer to encode to
* @returns {Writer} writer
@@ -407,7 +407,7 @@ Type.prototype.encode = function encode_setup(message, writer) {
};
/**
* Encodes a message of this type preceeded by its byte length as a varint.
* Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.
* @param {Message|Object} message Message instance or plain object
* @param {Writer} [writer] Writer to encode to
* @returns {Writer} writer
@@ -58,7 +58,7 @@ $root.Test1 = (function() {
};
/**
* Encodes the specified Test1 message.
* Encodes the specified Test1 message. Does not implicitly {@link Test1.verify|verify} messages.
* @param {Test1|Object} message Test1 message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -76,7 +76,7 @@ $root.Test1 = (function() {
};
/**
* Encodes the specified Test1 message, length delimited.
* Encodes the specified Test1 message, length delimited. Does not implicitly {@link Test1.verify|verify} messages.
* @param {Test1|Object} message Test1 message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -90,7 +90,7 @@ $root.Test1 = (function() {
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {Test1} Test1
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Test1.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
@@ -120,7 +120,7 @@ $root.Test1 = (function() {
* Decodes a Test1 message from the specified reader or buffer, length delimited.
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {Test1} Test1
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Test1.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
@@ -243,7 +243,7 @@ $root.Test2 = (function() {
};
/**
* Encodes the specified Test2 message.
* Encodes the specified Test2 message. Does not implicitly {@link Test2.verify|verify} messages.
* @param {Test2|Object} message Test2 message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -255,7 +255,7 @@ $root.Test2 = (function() {
};
/**
* Encodes the specified Test2 message, length delimited.
* Encodes the specified Test2 message, length delimited. Does not implicitly {@link Test2.verify|verify} messages.
* @param {Test2|Object} message Test2 message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -269,7 +269,7 @@ $root.Test2 = (function() {
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {Test2} Test2
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Test2.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
@@ -290,7 +290,7 @@ $root.Test2 = (function() {
* Decodes a Test2 message from the specified reader or buffer, length delimited.
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {Test2} Test2
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Test2.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
@@ -96,7 +96,7 @@ $root.Message = (function() {
};
/**
* Encodes the specified Message message.
* Encodes the specified Message message. Does not implicitly {@link Message.verify|verify} messages.
* @param {Message|Object} message Message message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -137,7 +137,7 @@ $root.Message = (function() {
};
/**
* Encodes the specified Message message, length delimited.
* Encodes the specified Message message, length delimited. Does not implicitly {@link Message.verify|verify} messages.
* @param {Message|Object} message Message message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -151,7 +151,7 @@ $root.Message = (function() {
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {Message} Message
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Message.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
@@ -222,7 +222,7 @@ $root.Message = (function() {
* Decodes a Message message from the specified reader or buffer, length delimited.
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {Message} Message
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Message.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
@@ -56,7 +56,7 @@ $root.vector_tile = (function() {
};
/**
* Encodes the specified Tile message.
* Encodes the specified Tile message. Does not implicitly {@link vector_tile.Tile.verify|verify} messages.
* @param {vector_tile.Tile|Object} message Tile message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -71,7 +71,7 @@ $root.vector_tile = (function() {
};
/**
* Encodes the specified Tile message, length delimited.
* Encodes the specified Tile message, length delimited. Does not implicitly {@link vector_tile.Tile.verify|verify} messages.
* @param {vector_tile.Tile|Object} message Tile message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -85,7 +85,7 @@ $root.vector_tile = (function() {
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {vector_tile.Tile} Tile
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Tile.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
@@ -111,7 +111,7 @@ $root.vector_tile = (function() {
* Decodes a Tile message from the specified reader or buffer, length delimited.
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {vector_tile.Tile} Tile
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Tile.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
@@ -292,7 +292,7 @@ $root.vector_tile = (function() {
};
/**
* Encodes the specified Value message.
* Encodes the specified Value message. Does not implicitly {@link vector_tile.Tile.Value.verify|verify} messages.
* @param {vector_tile.Tile.Value|Object} message Value message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -318,7 +318,7 @@ $root.vector_tile = (function() {
};
/**
* Encodes the specified Value message, length delimited.
* Encodes the specified Value message, length delimited. Does not implicitly {@link vector_tile.Tile.Value.verify|verify} messages.
* @param {vector_tile.Tile.Value|Object} message Value message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -332,7 +332,7 @@ $root.vector_tile = (function() {
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {vector_tile.Tile.Value} Value
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Value.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
@@ -374,7 +374,7 @@ $root.vector_tile = (function() {
* Decodes a Value message from the specified reader or buffer, length delimited.
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {vector_tile.Tile.Value} Value
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Value.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
@@ -600,7 +600,7 @@ $root.vector_tile = (function() {
};
/**
* Encodes the specified Feature message.
* Encodes the specified Feature message. Does not implicitly {@link vector_tile.Tile.Feature.verify|verify} messages.
* @param {vector_tile.Tile.Feature|Object} message Feature message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -628,7 +628,7 @@ $root.vector_tile = (function() {
};
/**
* Encodes the specified Feature message, length delimited.
* Encodes the specified Feature message, length delimited. Does not implicitly {@link vector_tile.Tile.Feature.verify|verify} messages.
* @param {vector_tile.Tile.Feature|Object} message Feature message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -642,7 +642,7 @@ $root.vector_tile = (function() {
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {vector_tile.Tile.Feature} Feature
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Feature.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
@@ -689,7 +689,7 @@ $root.vector_tile = (function() {
* Decodes a Feature message from the specified reader or buffer, length delimited.
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {vector_tile.Tile.Feature} Feature
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Feature.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
@@ -925,7 +925,7 @@ $root.vector_tile = (function() {
};
/**
* Encodes the specified Layer message.
* Encodes the specified Layer message. Does not implicitly {@link vector_tile.Tile.Layer.verify|verify} messages.
* @param {vector_tile.Tile.Layer|Object} message Layer message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -950,7 +950,7 @@ $root.vector_tile = (function() {
};
/**
* Encodes the specified Layer message, length delimited.
* Encodes the specified Layer message, length delimited. Does not implicitly {@link vector_tile.Tile.Layer.verify|verify} messages.
* @param {vector_tile.Tile.Layer|Object} message Layer message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
@@ -964,7 +964,7 @@ $root.vector_tile = (function() {
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {vector_tile.Tile.Layer} Layer
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Layer.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
@@ -1013,7 +1013,7 @@ $root.vector_tile = (function() {
* Decodes a Layer message from the specified reader or buffer, length delimited.
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {vector_tile.Tile.Layer} Layer
* @throws {Error} If the payload is invalid or missing required fields
* @throws {Error} If the payload is not a reader or valid buffer or required fields are missing
*/
Layer.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
Oops, something went wrong.

0 comments on commit 7502dd2

Please sign in to comment.