From 03194c203d6ff61ae825e66f8a29ca204fa503b9 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Fri, 21 Apr 2017 15:29:36 +0200 Subject: [PATCH] Use JSDoc, they said, it documents code, they said. Fixes #770 --- cli/targets/static.js | 46 ++- index.d.ts | 7 + src/root.js | 7 +- tests/data/comments.js | 19 +- tests/data/convert.js | 10 +- tests/data/mapbox/vector_tile.js | 38 ++- tests/data/package.js | 14 +- tests/data/rpc-es6.js | 20 +- tests/data/rpc.d.ts | 36 ++- tests/data/rpc.js | 20 +- tests/data/test.d.ts | 114 +++---- tests/data/test.js | 500 +++++++++++++++---------------- 12 files changed, 415 insertions(+), 416 deletions(-) diff --git a/cli/targets/static.js b/cli/targets/static.js index 86178b02e..cc51c32ba 100644 --- a/cli/targets/static.js +++ b/cli/targets/static.js @@ -121,8 +121,8 @@ function buildNamespace(ref, ns) { push(""); pushComment([ ns.comment || "Namespace " + ns.name + ".", - "@namespace", - ns.parent instanceof protobuf.Root ? "@name " + escapeName(ns.name) : "@memberof " + exportName(ns.parent), + "@exports " + exportName(ns), + "@namespace" ]); push((config.es6 ? "const" : "var") + " " + escapeName(ns.name) + " = {};"); } @@ -348,13 +348,11 @@ function toJsType(field) { } function buildType(ref, type) { - var fullName = type.fullName.substring(1); if (config.comments) { var typeDef = [ "Properties of " + aOrAn(type.name) + ".", - "@interface I" + escapeName(type.name), - type.parent instanceof protobuf.Root ? "@name I" + escapeName(type.name) : "@memberof " + exportName(type.parent) + "@interface " + exportName(type, true) ]; type.fieldsArray.forEach(function(field) { var prop = util.safeProp(field.name); @@ -369,11 +367,10 @@ function buildType(ref, type) { push(""); pushComment([ "Constructs a new " + type.name + ".", - type.comment ? "@classdesc " + type.comment : null, + "@exports " + exportName(type), + "@classdesc " + (type.comment || "Represents " + aOrAn(type.name)), "@constructor", - // "@extends $protobuf.Message<" + exportName(type) + ">", - "@param {" + exportName(type, true) + "=} [" + (config.beautify ? "properties" : "p") + "] Properties to set", - type.parent instanceof protobuf.Root ? "@name " + escapeName(type.name) : "@memberof " + exportName(type.parent) + "@param {" + exportName(type, true) + "=} [" + (config.beautify ? "properties" : "p") + "] Properties to set" ]); buildFunction(type, type.name, Type.generateConstructor(type)); @@ -425,7 +422,7 @@ function buildType(ref, type) { push(""); pushComment([ oneof.comment || type.name + " " + oneof.name + ".", - "@name " + fullName + "#" + escapeName(oneof.name), + "@name " + exportName(type) + "#" + escapeName(oneof.name), "@type {string|undefined}" ]); push("Object.defineProperty(" + escapeName(type.name) + ".prototype, " + JSON.stringify(oneof.name) +", {"); @@ -453,7 +450,7 @@ function buildType(ref, type) { if (config.encode) { push(""); pushComment([ - "Encodes the specified " + type.name + " message. Does not implicitly {@link " + fullName + ".verify|verify} messages.", + "Encodes the specified " + type.name + " message. Does not implicitly {@link " + exportName(type) + ".verify|verify} messages.", "@param {" + exportName(type, !config.forceMessage) + "} " + (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" @@ -463,7 +460,7 @@ function buildType(ref, type) { if (config.delimited) { push(""); pushComment([ - "Encodes the specified " + type.name + " message, length delimited. Does not implicitly {@link " + fullName + ".verify|verify} messages.", + "Encodes the specified " + type.name + " message, length delimited. Does not implicitly {@link " + exportName(type) + ".verify|verify} messages.", "@param {" + exportName(type, !config.forceMessage) + "} message " + type.name + " message or plain object to encode", "@param {$protobuf.Writer} [writer] Writer to encode to", "@returns {$protobuf.Writer} Writer" @@ -482,7 +479,7 @@ function buildType(ref, type) { "Decodes " + aOrAn(type.name) + " message from the specified reader or buffer.", "@param {$protobuf.Reader|Uint8Array} " + (config.beautify ? "reader" : "r") + " Reader or buffer to decode from", "@param {number} [" + (config.beautify ? "length" : "l") + "] Message length if known beforehand", - "@returns {" + fullName + "} " + type.name, + "@returns {" + exportName(type) + "} " + type.name, "@throws {Error} If the payload is not a reader or valid buffer", "@throws {$protobuf.util.ProtocolError} If required fields are missing" ]); @@ -493,7 +490,7 @@ function buildType(ref, type) { pushComment([ "Decodes " + aOrAn(type.name) + " message from the specified reader or buffer, length delimited.", "@param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from", - "@returns {" + fullName + "} " + type.name, + "@returns {" + exportName(type) + "} " + type.name, "@throws {Error} If the payload is not a reader or valid buffer", "@throws {$protobuf.util.ProtocolError} If required fields are missing" ]); @@ -524,14 +521,14 @@ function buildType(ref, type) { pushComment([ "Creates " + aOrAn(type.name) + " message from a plain object. Also converts values to their respective internal types.", "@param {Object.} " + (config.beautify ? "object" : "d") + " Plain object", - "@returns {" + fullName + "} " + type.name + "@returns {" + exportName(type) + "} " + type.name ]); buildFunction(type, "fromObject", protobuf.converter.fromObject(type)); push(""); pushComment([ "Creates a plain object from " + aOrAn(type.name) + " message. Also converts values to other types if specified.", - "@param {" + fullName + "} " + (config.beautify ? "message" : "m") + " " + type.name, + "@param {" + exportName(type) + "} " + (config.beautify ? "message" : "m") + " " + type.name, "@param {$protobuf.IConversionOptions} [" + (config.beautify ? "options" : "o") + "] Conversion options", "@returns {Object.} Plain object" ]); @@ -555,13 +552,13 @@ function buildService(ref, service) { push(""); pushComment([ "Constructs a new " + service.name + " service.", - service.comment ? "@classdesc " + service.comment : null, + "@exports " + exportName(service), + "@classdesc " + (service.comment || "Represents " + aOrAn(service.name)), "@extends $protobuf.rpc.Service", "@constructor", "@param {$protobuf.RPCImpl} rpcImpl RPC implementation", "@param {boolean} [requestDelimited=false] Whether requests are length-delimited", - "@param {boolean} [responseDelimited=false] Whether responses are length-delimited", - service.parent instanceof protobuf.Root ? "@name " + escapeName(service.name) : "@memberof " + exportName(service.parent) + "@param {boolean} [responseDelimited=false] Whether responses are length-delimited" ]); push("function " + escapeName(service.name) + "(rpcImpl, requestDelimited, responseDelimited) {"); ++indent; @@ -598,7 +595,7 @@ function buildService(ref, service) { "@typedef " + cbName, "@type {function}", "@param {Error|null} error Error, if any", - "@param {" + method.resolvedResponseType.fullName.substring(1) + "} [response] " + method.resolvedResponseType.name + "@param {" + exportName(method.resolvedResponseType) + "} [response] " + method.resolvedResponseType.name ]); push(""); pushComment([ @@ -609,15 +606,14 @@ function buildService(ref, service) { ]); push(escapeName(service.name) + ".prototype" + util.safeProp(lcName) + " = function " + escapeName(lcName) + "(request, callback) {"); ++indent; - push("return this.rpcCall(" + escapeName(lcName) + ", $root" + method.resolvedRequestType.fullName + ", $root" + method.resolvedResponseType.fullName + ", request, callback);"); + push("return this.rpcCall(" + escapeName(lcName) + ", $root." + exportName(method.resolvedRequestType) + ", $root." + exportName(method.resolvedResponseType) + ", request, callback);"); --indent; push("};"); if (config.comments) push(""); pushComment([ method.comment || "Calls " + method.name + ".", - "@name " + escapeName(service.name) + "#" + lcName, - "@function", + "@function " + escapeName(service.name) + "#" + lcName, "@param {" + exportName(method.resolvedRequestType, !config.forceMessage) + "} request " + method.resolvedRequestType.name + " message or plain object", "@returns {Promise<" + exportName(method.resolvedResponseType) + ">} Promise", "@variation 2" @@ -630,9 +626,7 @@ function buildEnum(ref, enm) { push(""); var comment = [ enm.comment || enm.name + " enum.", - "@name " + escapeName(enm.name), - "@enum {number}", - enm.parent instanceof protobuf.Root ? "@name " + escapeName(enm.name) : "@memberof " + exportName(enm.parent) + "@enum {number} " + exportName(enm) ]; Object.keys(enm.values).forEach(function(key) { var val = enm.values[key]; diff --git a/index.d.ts b/index.d.ts index a6add4ac5..95b28e07f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1183,6 +1183,13 @@ export class Root extends NamespaceBase { */ public load(filename: (string|string[]), options: IParseOptions, callback: LoadCallback): void; + /** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @param filename Names of one or multiple files to load + * @param callback Callback function + */ + public load(filename: (string|string[]), callback: LoadCallback): void; + /** * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. * @param filename Names of one or multiple files to load diff --git a/src/root.js b/src/root.js index 3dab68743..5fb0f0b62 100644 --- a/src/root.js +++ b/src/root.js @@ -203,6 +203,7 @@ Root.prototype.load = function load(filename, options, callback) { /** * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @function Root#load * @param {string|string[]} filename Names of one or multiple files to load * @param {LoadCallback} callback Callback function * @returns {undefined} @@ -212,8 +213,7 @@ Root.prototype.load = function load(filename, options, callback) { /** * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. - * @name Root#load - * @function + * @function Root#load * @param {string|string[]} filename Names of one or multiple files to load * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. * @returns {Promise} Promise @@ -223,8 +223,7 @@ Root.prototype.load = function load(filename, options, callback) { /** * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). - * @name Root#loadSync - * @function + * @function Root#loadSync * @param {string|string[]} filename Names of one or multiple files to load * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. * @returns {Root} Root namespace diff --git a/tests/data/comments.js b/tests/data/comments.js index fa207c313..ab11c67c1 100644 --- a/tests/data/comments.js +++ b/tests/data/comments.js @@ -14,7 +14,6 @@ $root.Test1 = (function() { /** * Properties of a Test1. * @interface ITest1 - * @name ITest1 * @property {string} [field1] Field with a comment. * @property {number} [field2] Test1 field2. * @property {boolean} [field3] Field with a comment and a link @@ -22,13 +21,13 @@ $root.Test1 = (function() { /** * Constructs a new Test1. + * @exports Test1 * @classdesc Message * with * a * comment. * @constructor * @param {ITest1=} [properties] Properties to set - * @name Test1 */ function Test1(properties) { if (properties) @@ -140,7 +139,7 @@ $root.Test1 = (function() { /** * Verifies a Test1 message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Test1.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -215,14 +214,14 @@ $root.Test2 = (function() { /** * Properties of a Test2. * @interface ITest2 - * @name ITest2 */ /** * Constructs a new Test2. + * @exports Test2 + * @classdesc Represents a Test2 * @constructor * @param {ITest2=} [properties] Properties to set - * @name Test2 */ function Test2(properties) { if (properties) @@ -301,7 +300,7 @@ $root.Test2 = (function() { /** * Verifies a Test2 message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Test2.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -343,18 +342,18 @@ $root.Test2 = (function() { /** * Test3 enum. - * @name Test3 - * @enum {number} - * @name Test3 + * @enum {number} Test3 * @property {number} ONE=1 Value with a comment. * @property {number} TWO=2 TWO value - * @property {number} THREE=3 Value with a comment. + * @property {number} THREE=3 Preferred value with a comment. + * @property {number} FOUR=4 Other value with a comment. */ $root.Test3 = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[1] = "ONE"] = 1; values[valuesById[2] = "TWO"] = 2; values[valuesById[3] = "THREE"] = 3; + values[valuesById[4] = "FOUR"] = 4; return values; })(); diff --git a/tests/data/convert.js b/tests/data/convert.js index 6056c2ec9..356410526 100644 --- a/tests/data/convert.js +++ b/tests/data/convert.js @@ -14,7 +14,6 @@ $root.Message = (function() { /** * Properties of a Message. * @interface IMessage - * @name IMessage * @property {string} [stringVal] Message stringVal. * @property {Array.} [stringRepeated] Message stringRepeated. * @property {number|Long} [uint64Val] Message uint64Val. @@ -28,9 +27,10 @@ $root.Message = (function() { /** * Constructs a new Message. + * @exports Message + * @classdesc Represents a Message * @constructor * @param {IMessage=} [properties] Properties to set - * @name Message */ function Message(properties) { this.stringRepeated = []; @@ -247,7 +247,7 @@ $root.Message = (function() { /** * Verifies a Message message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Message.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -497,9 +497,7 @@ $root.Message = (function() { /** * SomeEnum enum. - * @name SomeEnum - * @enum {number} - * @memberof Message + * @enum {number} Message.SomeEnum * @property {number} ONE=1 ONE value * @property {number} TWO=2 TWO value */ diff --git a/tests/data/mapbox/vector_tile.js b/tests/data/mapbox/vector_tile.js index 565adecbb..5f6365d81 100644 --- a/tests/data/mapbox/vector_tile.js +++ b/tests/data/mapbox/vector_tile.js @@ -13,8 +13,8 @@ $root.vector_tile = (function() { /** * Namespace vector_tile. + * @exports vector_tile * @namespace - * @name vector_tile */ var vector_tile = {}; @@ -22,16 +22,16 @@ $root.vector_tile = (function() { /** * Properties of a Tile. - * @interface ITile - * @memberof vector_tile + * @interface vector_tile.ITile * @property {Array.} [layers] Tile layers. */ /** * Constructs a new Tile. + * @exports vector_tile.Tile + * @classdesc Represents a Tile * @constructor * @param {vector_tile.ITile=} [properties] Properties to set - * @memberof vector_tile */ function Tile(properties) { this.layers = []; @@ -125,7 +125,7 @@ $root.vector_tile = (function() { /** * Verifies a Tile message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Tile.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -194,9 +194,7 @@ $root.vector_tile = (function() { /** * GeomType enum. - * @name GeomType - * @enum {number} - * @memberof vector_tile.Tile + * @enum {number} vector_tile.Tile.GeomType * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} POINT=1 POINT value * @property {number} LINESTRING=2 LINESTRING value @@ -215,8 +213,7 @@ $root.vector_tile = (function() { /** * Properties of a Value. - * @interface IValue - * @memberof vector_tile.Tile + * @interface vector_tile.Tile.IValue * @property {string} [stringValue] Value stringValue. * @property {number} [floatValue] Value floatValue. * @property {number} [doubleValue] Value doubleValue. @@ -228,9 +225,10 @@ $root.vector_tile = (function() { /** * Constructs a new Value. + * @exports vector_tile.Tile.Value + * @classdesc Represents a Value * @constructor * @param {vector_tile.Tile.IValue=} [properties] Properties to set - * @memberof vector_tile.Tile */ function Value(properties) { if (properties) @@ -386,7 +384,7 @@ $root.vector_tile = (function() { /** * Verifies a Value message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Value.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -534,8 +532,7 @@ $root.vector_tile = (function() { /** * Properties of a Feature. - * @interface IFeature - * @memberof vector_tile.Tile + * @interface vector_tile.Tile.IFeature * @property {number|Long} [id] Feature id. * @property {Array.} [tags] Feature tags. * @property {vector_tile.Tile.GeomType} [type] Feature type. @@ -544,9 +541,10 @@ $root.vector_tile = (function() { /** * Constructs a new Feature. + * @exports vector_tile.Tile.Feature + * @classdesc Represents a Feature * @constructor * @param {vector_tile.Tile.IFeature=} [properties] Properties to set - * @memberof vector_tile.Tile */ function Feature(properties) { this.tags = []; @@ -693,7 +691,7 @@ $root.vector_tile = (function() { /** * Verifies a Feature message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Feature.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -838,8 +836,7 @@ $root.vector_tile = (function() { /** * Properties of a Layer. - * @interface ILayer - * @memberof vector_tile.Tile + * @interface vector_tile.Tile.ILayer * @property {number} version Layer version. * @property {string} name Layer name. * @property {Array.} [features] Layer features. @@ -850,9 +847,10 @@ $root.vector_tile = (function() { /** * Constructs a new Layer. + * @exports vector_tile.Tile.Layer + * @classdesc Represents a Layer * @constructor * @param {vector_tile.Tile.ILayer=} [properties] Properties to set - * @memberof vector_tile.Tile */ function Layer(properties) { this.features = []; @@ -1011,7 +1009,7 @@ $root.vector_tile = (function() { /** * Verifies a Layer message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Layer.verify = function verify(message) { if (typeof message !== "object" || message === null) diff --git a/tests/data/package.js b/tests/data/package.js index 8384400ea..a8c318561 100644 --- a/tests/data/package.js +++ b/tests/data/package.js @@ -14,7 +14,6 @@ $root.Package = (function() { /** * Properties of a Package. * @interface IPackage - * @name IPackage * @property {string} [name] Package name. * @property {string} [version] Package version. * @property {string} [versionScheme] Package versionScheme. @@ -36,9 +35,10 @@ $root.Package = (function() { /** * Constructs a new Package. + * @exports Package + * @classdesc Represents a Package * @constructor * @param {IPackage=} [properties] Properties to set - * @name Package */ function Package(properties) { this.keywords = []; @@ -340,7 +340,7 @@ $root.Package = (function() { /** * Verifies a Package message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Package.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -609,17 +609,17 @@ $root.Package = (function() { /** * Properties of a Repository. - * @interface IRepository - * @memberof Package + * @interface Package.IRepository * @property {string} [type] Repository type. * @property {string} [url] Repository url. */ /** * Constructs a new Repository. + * @exports Package.Repository + * @classdesc Represents a Repository * @constructor * @param {Package.IRepository=} [properties] Properties to set - * @memberof Package */ function Repository(properties) { if (properties) @@ -720,7 +720,7 @@ $root.Package = (function() { /** * Verifies a Repository message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Repository.verify = function verify(message) { if (typeof message !== "object" || message === null) diff --git a/tests/data/rpc-es6.js b/tests/data/rpc-es6.js index 66aeeec7e..c4b270fc2 100644 --- a/tests/data/rpc-es6.js +++ b/tests/data/rpc-es6.js @@ -11,12 +11,13 @@ export const MyService = $root.MyService = (() => { /** * Constructs a new MyService service. + * @exports MyService + * @classdesc Represents a MyService * @extends $protobuf.rpc.Service * @constructor * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @name MyService */ function MyService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); @@ -39,7 +40,7 @@ export const MyService = $root.MyService = (() => { * Callback as used by {@link MyService#myMethod}. * @typedef MyService_myMethod_Callback * @type {function} - * @param {?Error} error Error, if any + * @param {Error|null} error Error, if any * @param {MyResponse} [response] MyResponse */ @@ -55,8 +56,7 @@ export const MyService = $root.MyService = (() => { /** * Calls MyMethod. - * @name MyService#myMethod - * @function + * @function MyService#myMethod * @param {IMyRequest} request MyRequest message or plain object * @returns {Promise} Promise * @variation 2 @@ -70,15 +70,15 @@ export const MyRequest = $root.MyRequest = (() => { /** * Properties of a MyRequest. * @interface IMyRequest - * @name IMyRequest * @property {string} [path] MyRequest path. */ /** * Constructs a new MyRequest. + * @exports MyRequest + * @classdesc Represents a MyRequest * @constructor * @param {IMyRequest=} [properties] Properties to set - * @name MyRequest */ function MyRequest(properties) { if (properties) @@ -168,7 +168,7 @@ export const MyRequest = $root.MyRequest = (() => { /** * Verifies a MyRequest message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -226,15 +226,15 @@ export const MyResponse = $root.MyResponse = (() => { /** * Properties of a MyResponse. * @interface IMyResponse - * @name IMyResponse * @property {number} [status] MyResponse status. */ /** * Constructs a new MyResponse. + * @exports MyResponse + * @classdesc Represents a MyResponse * @constructor * @param {IMyResponse=} [properties] Properties to set - * @name MyResponse */ function MyResponse(properties) { if (properties) @@ -324,7 +324,7 @@ export const MyResponse = $root.MyResponse = (() => { /** * Verifies a MyResponse message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MyResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) diff --git a/tests/data/rpc.d.ts b/tests/data/rpc.d.ts index d4ce4fa56..8d4add1fe 100644 --- a/tests/data/rpc.d.ts +++ b/tests/data/rpc.d.ts @@ -2,23 +2,45 @@ import * as $protobuf from "../.."; export class MyService extends $protobuf.rpc.Service { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MyService; + public myMethod(request: IMyRequest, callback: MyService_myMethod_Callback): void; public myMethod(request: IMyRequest): Promise; } -type MyService_myMethod_Callback = (error: Error, response?: MyResponse) => void; - -export class MyRequest { - constructor(properties?: IMyRequest); -} +type MyService_myMethod_Callback = (error: (Error|null), response?: MyResponse) => void; export interface IMyRequest { path?: string; } -export class MyResponse { - constructor(properties?: IMyResponse); +export class MyRequest { + constructor(properties?: IMyRequest); + public path: string; + public static create(properties?: IMyRequest): MyRequest; + public static encode(message: IMyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: IMyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MyRequest; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): MyRequest; + public static toObject(message: MyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } export interface IMyResponse { status?: number; } + +export class MyResponse { + constructor(properties?: IMyResponse); + public status: number; + public static create(properties?: IMyResponse): MyResponse; + public static encode(message: IMyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: IMyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MyResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MyResponse; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): MyResponse; + public static toObject(message: MyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; +} diff --git a/tests/data/rpc.js b/tests/data/rpc.js index 11f831283..e45319961 100644 --- a/tests/data/rpc.js +++ b/tests/data/rpc.js @@ -13,12 +13,13 @@ $root.MyService = (function() { /** * Constructs a new MyService service. + * @exports MyService + * @classdesc Represents a MyService * @extends $protobuf.rpc.Service * @constructor * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @name MyService */ function MyService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); @@ -41,7 +42,7 @@ $root.MyService = (function() { * Callback as used by {@link MyService#myMethod}. * @typedef MyService_myMethod_Callback * @type {function} - * @param {?Error} error Error, if any + * @param {Error|null} error Error, if any * @param {MyResponse} [response] MyResponse */ @@ -57,8 +58,7 @@ $root.MyService = (function() { /** * Calls MyMethod. - * @name MyService#myMethod - * @function + * @function MyService#myMethod * @param {IMyRequest} request MyRequest message or plain object * @returns {Promise} Promise * @variation 2 @@ -72,15 +72,15 @@ $root.MyRequest = (function() { /** * Properties of a MyRequest. * @interface IMyRequest - * @name IMyRequest * @property {string} [path] MyRequest path. */ /** * Constructs a new MyRequest. + * @exports MyRequest + * @classdesc Represents a MyRequest * @constructor * @param {IMyRequest=} [properties] Properties to set - * @name MyRequest */ function MyRequest(properties) { if (properties) @@ -170,7 +170,7 @@ $root.MyRequest = (function() { /** * Verifies a MyRequest message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -228,15 +228,15 @@ $root.MyResponse = (function() { /** * Properties of a MyResponse. * @interface IMyResponse - * @name IMyResponse * @property {number} [status] MyResponse status. */ /** * Constructs a new MyResponse. + * @exports MyResponse + * @classdesc Represents a MyResponse * @constructor * @param {IMyResponse=} [properties] Properties to set - * @name MyResponse */ function MyResponse(properties) { if (properties) @@ -326,7 +326,7 @@ $root.MyResponse = (function() { /** * Verifies a MyResponse message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MyResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) diff --git a/tests/data/test.d.ts b/tests/data/test.d.ts index f9e5319b1..77b7f2096 100644 --- a/tests/data/test.d.ts +++ b/tests/data/test.d.ts @@ -14,7 +14,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Empty; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Empty; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.Empty; public static toObject(message: jspb.test.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -37,7 +37,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IEnumContainer, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.EnumContainer; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.EnumContainer; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.EnumContainer; public static toObject(message: jspb.test.EnumContainer, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -59,7 +59,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ISimple1, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Simple1; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Simple1; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.Simple1; public static toObject(message: jspb.test.Simple1, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -79,7 +79,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ISimple2, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Simple2; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Simple2; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.Simple2; public static toObject(message: jspb.test.Simple2, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -103,7 +103,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ISpecialCases, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.SpecialCases; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.SpecialCases; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.SpecialCases; public static toObject(message: jspb.test.SpecialCases, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -129,7 +129,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IOptionalFields, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OptionalFields; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OptionalFields; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.OptionalFields; public static toObject(message: jspb.test.OptionalFields, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -149,7 +149,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.OptionalFields.INested, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OptionalFields.Nested; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OptionalFields.Nested; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.OptionalFields.Nested; public static toObject(message: jspb.test.OptionalFields.Nested, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -184,7 +184,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IHasExtensions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.HasExtensions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.HasExtensions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.HasExtensions; public static toObject(message: jspb.test.HasExtensions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -210,7 +210,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IComplex, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Complex; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Complex; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.Complex; public static toObject(message: jspb.test.Complex, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -230,7 +230,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.Complex.INested, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Complex.Nested; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Complex.Nested; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.Complex.Nested; public static toObject(message: jspb.test.Complex.Nested, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -247,7 +247,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IOuterMessage, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OuterMessage; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OuterMessage; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.OuterMessage; public static toObject(message: jspb.test.OuterMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -267,7 +267,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.OuterMessage.IComplex, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OuterMessage.Complex; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OuterMessage.Complex; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.OuterMessage.Complex; public static toObject(message: jspb.test.OuterMessage.Complex, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -286,7 +286,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IIsExtension, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.IsExtension; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.IsExtension; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.IsExtension; public static toObject(message: jspb.test.IsExtension, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -302,7 +302,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IIndirectExtension, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.IndirectExtension; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.IndirectExtension; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.IndirectExtension; public static toObject(message: jspb.test.IndirectExtension, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -330,7 +330,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IDefaultValues, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.DefaultValues; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.DefaultValues; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.DefaultValues; public static toObject(message: jspb.test.DefaultValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -370,7 +370,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IFloatingPointFields, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.FloatingPointFields; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.FloatingPointFields; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.FloatingPointFields; public static toObject(message: jspb.test.FloatingPointFields, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -398,7 +398,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ITestClone, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestClone; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestClone; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestClone; public static toObject(message: jspb.test.TestClone, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -416,7 +416,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ICloneExtension, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.CloneExtension; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.CloneExtension; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.CloneExtension; public static toObject(message: jspb.test.CloneExtension, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -444,7 +444,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ITestGroup, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup; public static toObject(message: jspb.test.TestGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -466,7 +466,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.TestGroup.IRepeatedGroup, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.RepeatedGroup; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.RepeatedGroup; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.RepeatedGroup; public static toObject(message: jspb.test.TestGroup.RepeatedGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -484,7 +484,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.TestGroup.IRequiredGroup, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.RequiredGroup; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.RequiredGroup; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.RequiredGroup; public static toObject(message: jspb.test.TestGroup.RequiredGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -502,7 +502,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.TestGroup.IOptionalGroup, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.OptionalGroup; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.OptionalGroup; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.OptionalGroup; public static toObject(message: jspb.test.TestGroup.OptionalGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -521,7 +521,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ITestGroup1, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup1; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup1; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup1; public static toObject(message: jspb.test.TestGroup1, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -541,7 +541,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ITestReservedNames, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestReservedNames; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestReservedNames; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestReservedNames; public static toObject(message: jspb.test.TestReservedNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -557,7 +557,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ITestReservedNamesExtension, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestReservedNamesExtension; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestReservedNamesExtension; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestReservedNamesExtension; public static toObject(message: jspb.test.TestReservedNamesExtension, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -597,7 +597,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ITestMessageWithOneof, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestMessageWithOneof; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestMessageWithOneof; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestMessageWithOneof; public static toObject(message: jspb.test.TestMessageWithOneof, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -617,7 +617,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ITestEndsWithBytes, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestEndsWithBytes; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestEndsWithBytes; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestEndsWithBytes; public static toObject(message: jspb.test.TestEndsWithBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -657,7 +657,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.ITestMapFieldsNoBinary, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestMapFieldsNoBinary; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestMapFieldsNoBinary; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.TestMapFieldsNoBinary; public static toObject(message: jspb.test.TestMapFieldsNoBinary, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -681,7 +681,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IMapValueMessageNoBinary, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.MapValueMessageNoBinary; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.MapValueMessageNoBinary; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.MapValueMessageNoBinary; public static toObject(message: jspb.test.MapValueMessageNoBinary, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -697,7 +697,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.IDeeply, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.Deeply; public static toObject(message: jspb.test.Deeply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -715,7 +715,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.Deeply.INested, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply.Nested; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply.Nested; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.Deeply.Nested; public static toObject(message: jspb.test.Deeply.Nested, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -735,7 +735,7 @@ export namespace jspb { public static encodeDelimited(message: jspb.test.Deeply.Nested.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply.Nested.Message; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply.Nested.Message; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): jspb.test.Deeply.Nested.Message; public static toObject(message: jspb.test.Deeply.Nested.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -761,7 +761,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -801,7 +801,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -837,7 +837,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -859,7 +859,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -879,7 +879,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -916,7 +916,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -966,7 +966,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -988,7 +988,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1010,7 +1010,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1032,7 +1032,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1060,7 +1060,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1106,7 +1106,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1141,7 +1141,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1171,7 +1171,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1204,7 +1204,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1228,7 +1228,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1248,7 +1248,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1268,7 +1268,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1290,7 +1290,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1329,7 +1329,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1351,7 +1351,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1370,7 +1370,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1398,7 +1398,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1417,7 +1417,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; @@ -1443,7 +1443,7 @@ export namespace google { public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - public static verify(message: { [k: string]: any }): string; + public static verify(message: { [k: string]: any }): (string|null); public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; diff --git a/tests/data/test.js b/tests/data/test.js index bb54f3243..99267bfee 100644 --- a/tests/data/test.js +++ b/tests/data/test.js @@ -13,8 +13,8 @@ $root.jspb = (function() { /** * Namespace jspb. + * @exports jspb * @namespace - * @name jspb */ var jspb = {}; @@ -22,8 +22,8 @@ $root.jspb = (function() { /** * Namespace test. + * @exports jspb.test * @namespace - * @memberof jspb */ var test = {}; @@ -31,15 +31,15 @@ $root.jspb = (function() { /** * Properties of an Empty. - * @interface IEmpty - * @memberof jspb.test + * @interface jspb.test.IEmpty */ /** * Constructs a new Empty. + * @exports jspb.test.Empty + * @classdesc Represents an Empty * @constructor * @param {jspb.test.IEmpty=} [properties] Properties to set - * @memberof jspb.test */ function Empty(properties) { if (properties) @@ -118,7 +118,7 @@ $root.jspb = (function() { /** * Verifies an Empty message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -160,9 +160,7 @@ $root.jspb = (function() { /** * OuterEnum enum. - * @name OuterEnum - * @enum {number} - * @memberof jspb.test + * @enum {number} jspb.test.OuterEnum * @property {number} FOO=1 FOO value * @property {number} BAR=2 BAR value */ @@ -177,16 +175,16 @@ $root.jspb = (function() { /** * Properties of an EnumContainer. - * @interface IEnumContainer - * @memberof jspb.test + * @interface jspb.test.IEnumContainer * @property {jspb.test.OuterEnum} [outerEnum] EnumContainer outerEnum. */ /** * Constructs a new EnumContainer. + * @exports jspb.test.EnumContainer + * @classdesc Represents an EnumContainer * @constructor * @param {jspb.test.IEnumContainer=} [properties] Properties to set - * @memberof jspb.test */ function EnumContainer(properties) { if (properties) @@ -276,7 +274,7 @@ $root.jspb = (function() { /** * Verifies an EnumContainer message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ EnumContainer.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -346,8 +344,7 @@ $root.jspb = (function() { /** * Properties of a Simple1. - * @interface ISimple1 - * @memberof jspb.test + * @interface jspb.test.ISimple1 * @property {string} aString Simple1 aString. * @property {Array.} [aRepeatedString] Simple1 aRepeatedString. * @property {boolean} [aBoolean] Simple1 aBoolean. @@ -355,9 +352,10 @@ $root.jspb = (function() { /** * Constructs a new Simple1. + * @exports jspb.test.Simple1 + * @classdesc Represents a Simple1 * @constructor * @param {jspb.test.ISimple1=} [properties] Properties to set - * @memberof jspb.test */ function Simple1(properties) { this.aRepeatedString = []; @@ -474,7 +472,7 @@ $root.jspb = (function() { /** * Verifies a Simple1 message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Simple1.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -560,17 +558,17 @@ $root.jspb = (function() { /** * Properties of a Simple2. - * @interface ISimple2 - * @memberof jspb.test + * @interface jspb.test.ISimple2 * @property {string} aString Simple2 aString. * @property {Array.} [aRepeatedString] Simple2 aRepeatedString. */ /** * Constructs a new Simple2. + * @exports jspb.test.Simple2 + * @classdesc Represents a Simple2 * @constructor * @param {jspb.test.ISimple2=} [properties] Properties to set - * @memberof jspb.test */ function Simple2(properties) { this.aRepeatedString = []; @@ -676,7 +674,7 @@ $root.jspb = (function() { /** * Verifies a Simple2 message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Simple2.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -753,8 +751,7 @@ $root.jspb = (function() { /** * Properties of a SpecialCases. - * @interface ISpecialCases - * @memberof jspb.test + * @interface jspb.test.ISpecialCases * @property {string} normal SpecialCases normal. * @property {string} default SpecialCases default. * @property {string} function SpecialCases function. @@ -763,9 +760,10 @@ $root.jspb = (function() { /** * Constructs a new SpecialCases. + * @exports jspb.test.SpecialCases + * @classdesc Represents a SpecialCases * @constructor * @param {jspb.test.ISpecialCases=} [properties] Properties to set - * @memberof jspb.test */ function SpecialCases(properties) { if (properties) @@ -892,7 +890,7 @@ $root.jspb = (function() { /** * Verifies a SpecialCases message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SpecialCases.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -970,8 +968,7 @@ $root.jspb = (function() { /** * Properties of an OptionalFields. - * @interface IOptionalFields - * @memberof jspb.test + * @interface jspb.test.IOptionalFields * @property {string} [aString] OptionalFields aString. * @property {boolean} aBool OptionalFields aBool. * @property {jspb.test.OptionalFields.INested} [aNestedMessage] OptionalFields aNestedMessage. @@ -981,9 +978,10 @@ $root.jspb = (function() { /** * Constructs a new OptionalFields. + * @exports jspb.test.OptionalFields + * @classdesc Represents an OptionalFields * @constructor * @param {jspb.test.IOptionalFields=} [properties] Properties to set - * @memberof jspb.test */ function OptionalFields(properties) { this.aRepeatedMessage = []; @@ -1126,7 +1124,7 @@ $root.jspb = (function() { /** * Verifies an OptionalFields message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ OptionalFields.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -1248,16 +1246,16 @@ $root.jspb = (function() { /** * Properties of a Nested. - * @interface INested - * @memberof jspb.test.OptionalFields + * @interface jspb.test.OptionalFields.INested * @property {number} [anInt] Nested anInt. */ /** * Constructs a new Nested. + * @exports jspb.test.OptionalFields.Nested + * @classdesc Represents a Nested * @constructor * @param {jspb.test.OptionalFields.INested=} [properties] Properties to set - * @memberof jspb.test.OptionalFields */ function Nested(properties) { if (properties) @@ -1347,7 +1345,7 @@ $root.jspb = (function() { /** * Verifies a Nested message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Nested.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -1407,8 +1405,7 @@ $root.jspb = (function() { /** * Properties of a HasExtensions. - * @interface IHasExtensions - * @memberof jspb.test + * @interface jspb.test.IHasExtensions * @property {string} [str1] HasExtensions str1. * @property {string} [str2] HasExtensions str2. * @property {string} [str3] HasExtensions str3. @@ -1422,9 +1419,10 @@ $root.jspb = (function() { /** * Constructs a new HasExtensions. + * @exports jspb.test.HasExtensions + * @classdesc Represents a HasExtensions * @constructor * @param {jspb.test.IHasExtensions=} [properties] Properties to set - * @memberof jspb.test */ function HasExtensions(properties) { this[".jspb.test.IndirectExtension.repeatedStr"] = []; @@ -1610,7 +1608,7 @@ $root.jspb = (function() { /** * Verifies a HasExtensions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ HasExtensions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -1778,8 +1776,7 @@ $root.jspb = (function() { /** * Properties of a Complex. - * @interface IComplex - * @memberof jspb.test + * @interface jspb.test.IComplex * @property {string} aString Complex aString. * @property {boolean} anOutOfOrderBool Complex anOutOfOrderBool. * @property {jspb.test.Complex.INested} [aNestedMessage] Complex aNestedMessage. @@ -1789,9 +1786,10 @@ $root.jspb = (function() { /** * Constructs a new Complex. + * @exports jspb.test.Complex + * @classdesc Represents a Complex * @constructor * @param {jspb.test.IComplex=} [properties] Properties to set - * @memberof jspb.test */ function Complex(properties) { this.aRepeatedMessage = []; @@ -1935,7 +1933,7 @@ $root.jspb = (function() { /** * Verifies a Complex message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Complex.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -2056,16 +2054,16 @@ $root.jspb = (function() { /** * Properties of a Nested. - * @interface INested - * @memberof jspb.test.Complex + * @interface jspb.test.Complex.INested * @property {number} anInt Nested anInt. */ /** * Constructs a new Nested. + * @exports jspb.test.Complex.Nested + * @classdesc Represents a Nested * @constructor * @param {jspb.test.Complex.INested=} [properties] Properties to set - * @memberof jspb.test.Complex */ function Nested(properties) { if (properties) @@ -2156,7 +2154,7 @@ $root.jspb = (function() { /** * Verifies a Nested message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Nested.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -2215,15 +2213,15 @@ $root.jspb = (function() { /** * Properties of an OuterMessage. - * @interface IOuterMessage - * @memberof jspb.test + * @interface jspb.test.IOuterMessage */ /** * Constructs a new OuterMessage. + * @exports jspb.test.OuterMessage + * @classdesc Represents an OuterMessage * @constructor * @param {jspb.test.IOuterMessage=} [properties] Properties to set - * @memberof jspb.test */ function OuterMessage(properties) { if (properties) @@ -2302,7 +2300,7 @@ $root.jspb = (function() { /** * Verifies an OuterMessage message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ OuterMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -2343,16 +2341,16 @@ $root.jspb = (function() { /** * Properties of a Complex. - * @interface IComplex - * @memberof jspb.test.OuterMessage + * @interface jspb.test.OuterMessage.IComplex * @property {number} [innerComplexField] Complex innerComplexField. */ /** * Constructs a new Complex. + * @exports jspb.test.OuterMessage.Complex + * @classdesc Represents a Complex * @constructor * @param {jspb.test.OuterMessage.IComplex=} [properties] Properties to set - * @memberof jspb.test.OuterMessage */ function Complex(properties) { if (properties) @@ -2442,7 +2440,7 @@ $root.jspb = (function() { /** * Verifies a Complex message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Complex.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -2502,16 +2500,16 @@ $root.jspb = (function() { /** * Properties of an IsExtension. - * @interface IIsExtension - * @memberof jspb.test + * @interface jspb.test.IIsExtension * @property {string} [ext1] IsExtension ext1. */ /** * Constructs a new IsExtension. + * @exports jspb.test.IsExtension + * @classdesc Represents an IsExtension * @constructor * @param {jspb.test.IIsExtension=} [properties] Properties to set - * @memberof jspb.test */ function IsExtension(properties) { if (properties) @@ -2601,7 +2599,7 @@ $root.jspb = (function() { /** * Verifies an IsExtension message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ IsExtension.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -2658,15 +2656,15 @@ $root.jspb = (function() { /** * Properties of an IndirectExtension. - * @interface IIndirectExtension - * @memberof jspb.test + * @interface jspb.test.IIndirectExtension */ /** * Constructs a new IndirectExtension. + * @exports jspb.test.IndirectExtension + * @classdesc Represents an IndirectExtension * @constructor * @param {jspb.test.IIndirectExtension=} [properties] Properties to set - * @memberof jspb.test */ function IndirectExtension(properties) { if (properties) @@ -2745,7 +2743,7 @@ $root.jspb = (function() { /** * Verifies an IndirectExtension message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ IndirectExtension.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -2789,8 +2787,7 @@ $root.jspb = (function() { /** * Properties of a DefaultValues. - * @interface IDefaultValues - * @memberof jspb.test + * @interface jspb.test.IDefaultValues * @property {string} [stringField] DefaultValues stringField. * @property {boolean} [boolField] DefaultValues boolField. * @property {number|Long} [intField] DefaultValues intField. @@ -2801,9 +2798,10 @@ $root.jspb = (function() { /** * Constructs a new DefaultValues. + * @exports jspb.test.DefaultValues + * @classdesc Represents a DefaultValues * @constructor * @param {jspb.test.IDefaultValues=} [properties] Properties to set - * @memberof jspb.test */ function DefaultValues(properties) { if (properties) @@ -2948,7 +2946,7 @@ $root.jspb = (function() { /** * Verifies a DefaultValues message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ DefaultValues.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -3075,9 +3073,7 @@ $root.jspb = (function() { /** * Enum enum. - * @name Enum - * @enum {number} - * @memberof jspb.test.DefaultValues + * @enum {number} jspb.test.DefaultValues.Enum * @property {number} E1=13 E1 value * @property {number} E2=77 E2 value */ @@ -3095,8 +3091,7 @@ $root.jspb = (function() { /** * Properties of a FloatingPointFields. - * @interface IFloatingPointFields - * @memberof jspb.test + * @interface jspb.test.IFloatingPointFields * @property {number} [optionalFloatField] FloatingPointFields optionalFloatField. * @property {number} requiredFloatField FloatingPointFields requiredFloatField. * @property {Array.} [repeatedFloatField] FloatingPointFields repeatedFloatField. @@ -3109,9 +3104,10 @@ $root.jspb = (function() { /** * Constructs a new FloatingPointFields. + * @exports jspb.test.FloatingPointFields + * @classdesc Represents a FloatingPointFields * @constructor * @param {jspb.test.IFloatingPointFields=} [properties] Properties to set - * @memberof jspb.test */ function FloatingPointFields(properties) { this.repeatedFloatField = []; @@ -3298,7 +3294,7 @@ $root.jspb = (function() { /** * Verifies a FloatingPointFields message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FloatingPointFields.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -3436,8 +3432,7 @@ $root.jspb = (function() { /** * Properties of a TestClone. - * @interface ITestClone - * @memberof jspb.test + * @interface jspb.test.ITestClone * @property {string} [str] TestClone str. * @property {jspb.test.ISimple1} [simple1] TestClone simple1. * @property {Array.} [simple2] TestClone simple2. @@ -3448,9 +3443,10 @@ $root.jspb = (function() { /** * Constructs a new TestClone. + * @exports jspb.test.TestClone + * @classdesc Represents a TestClone * @constructor * @param {jspb.test.ITestClone=} [properties] Properties to set - * @memberof jspb.test */ function TestClone(properties) { this.simple2 = []; @@ -3599,7 +3595,7 @@ $root.jspb = (function() { /** * Verifies a TestClone message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TestClone.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -3728,16 +3724,16 @@ $root.jspb = (function() { /** * Properties of a CloneExtension. - * @interface ICloneExtension - * @memberof jspb.test + * @interface jspb.test.ICloneExtension * @property {string} [ext] CloneExtension ext. */ /** * Constructs a new CloneExtension. + * @exports jspb.test.CloneExtension + * @classdesc Represents a CloneExtension * @constructor * @param {jspb.test.ICloneExtension=} [properties] Properties to set - * @memberof jspb.test */ function CloneExtension(properties) { if (properties) @@ -3827,7 +3823,7 @@ $root.jspb = (function() { /** * Verifies a CloneExtension message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CloneExtension.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -3884,8 +3880,7 @@ $root.jspb = (function() { /** * Properties of a TestGroup. - * @interface ITestGroup - * @memberof jspb.test + * @interface jspb.test.ITestGroup * @property {Array.} [repeatedGroup] TestGroup repeatedGroup. * @property {jspb.test.TestGroup.IRequiredGroup} requiredGroup TestGroup requiredGroup. * @property {jspb.test.TestGroup.IOptionalGroup} [optionalGroup] TestGroup optionalGroup. @@ -3896,9 +3891,10 @@ $root.jspb = (function() { /** * Constructs a new TestGroup. + * @exports jspb.test.TestGroup + * @classdesc Represents a TestGroup * @constructor * @param {jspb.test.ITestGroup=} [properties] Properties to set - * @memberof jspb.test */ function TestGroup(properties) { this.repeatedGroup = []; @@ -4049,7 +4045,7 @@ $root.jspb = (function() { /** * Verifies a TestGroup message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TestGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -4178,17 +4174,17 @@ $root.jspb = (function() { /** * Properties of a RepeatedGroup. - * @interface IRepeatedGroup - * @memberof jspb.test.TestGroup + * @interface jspb.test.TestGroup.IRepeatedGroup * @property {string} id RepeatedGroup id. * @property {Array.} [someBool] RepeatedGroup someBool. */ /** * Constructs a new RepeatedGroup. + * @exports jspb.test.TestGroup.RepeatedGroup + * @classdesc Represents a RepeatedGroup * @constructor * @param {jspb.test.TestGroup.IRepeatedGroup=} [properties] Properties to set - * @memberof jspb.test.TestGroup */ function RepeatedGroup(properties) { this.someBool = []; @@ -4301,7 +4297,7 @@ $root.jspb = (function() { /** * Verifies a RepeatedGroup message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ RepeatedGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -4378,16 +4374,16 @@ $root.jspb = (function() { /** * Properties of a RequiredGroup. - * @interface IRequiredGroup - * @memberof jspb.test.TestGroup + * @interface jspb.test.TestGroup.IRequiredGroup * @property {string} id RequiredGroup id. */ /** * Constructs a new RequiredGroup. + * @exports jspb.test.TestGroup.RequiredGroup + * @classdesc Represents a RequiredGroup * @constructor * @param {jspb.test.TestGroup.IRequiredGroup=} [properties] Properties to set - * @memberof jspb.test.TestGroup */ function RequiredGroup(properties) { if (properties) @@ -4480,7 +4476,7 @@ $root.jspb = (function() { /** * Verifies a RequiredGroup message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ RequiredGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -4536,16 +4532,16 @@ $root.jspb = (function() { /** * Properties of an OptionalGroup. - * @interface IOptionalGroup - * @memberof jspb.test.TestGroup + * @interface jspb.test.TestGroup.IOptionalGroup * @property {string} id OptionalGroup id. */ /** * Constructs a new OptionalGroup. + * @exports jspb.test.TestGroup.OptionalGroup + * @classdesc Represents an OptionalGroup * @constructor * @param {jspb.test.TestGroup.IOptionalGroup=} [properties] Properties to set - * @memberof jspb.test.TestGroup */ function OptionalGroup(properties) { if (properties) @@ -4638,7 +4634,7 @@ $root.jspb = (function() { /** * Verifies an OptionalGroup message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ OptionalGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -4697,16 +4693,16 @@ $root.jspb = (function() { /** * Properties of a TestGroup1. - * @interface ITestGroup1 - * @memberof jspb.test + * @interface jspb.test.ITestGroup1 * @property {jspb.test.TestGroup.IRepeatedGroup} [group] TestGroup1 group. */ /** * Constructs a new TestGroup1. + * @exports jspb.test.TestGroup1 + * @classdesc Represents a TestGroup1 * @constructor * @param {jspb.test.ITestGroup1=} [properties] Properties to set - * @memberof jspb.test */ function TestGroup1(properties) { if (properties) @@ -4796,7 +4792,7 @@ $root.jspb = (function() { /** * Verifies a TestGroup1 message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TestGroup1.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -4858,17 +4854,17 @@ $root.jspb = (function() { /** * Properties of a TestReservedNames. - * @interface ITestReservedNames - * @memberof jspb.test + * @interface jspb.test.ITestReservedNames * @property {number} [extension] TestReservedNames extension. * @property {number} [".jspb.test.TestReservedNamesExtension.foo"] TestReservedNames .jspb.test.TestReservedNamesExtension.foo. */ /** * Constructs a new TestReservedNames. + * @exports jspb.test.TestReservedNames + * @classdesc Represents a TestReservedNames * @constructor * @param {jspb.test.ITestReservedNames=} [properties] Properties to set - * @memberof jspb.test */ function TestReservedNames(properties) { if (properties) @@ -4969,7 +4965,7 @@ $root.jspb = (function() { /** * Verifies a TestReservedNames message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TestReservedNames.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -5035,15 +5031,15 @@ $root.jspb = (function() { /** * Properties of a TestReservedNamesExtension. - * @interface ITestReservedNamesExtension - * @memberof jspb.test + * @interface jspb.test.ITestReservedNamesExtension */ /** * Constructs a new TestReservedNamesExtension. + * @exports jspb.test.TestReservedNamesExtension + * @classdesc Represents a TestReservedNamesExtension * @constructor * @param {jspb.test.ITestReservedNamesExtension=} [properties] Properties to set - * @memberof jspb.test */ function TestReservedNamesExtension(properties) { if (properties) @@ -5122,7 +5118,7 @@ $root.jspb = (function() { /** * Verifies a TestReservedNamesExtension message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TestReservedNamesExtension.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -5166,8 +5162,7 @@ $root.jspb = (function() { /** * Properties of a TestMessageWithOneof. - * @interface ITestMessageWithOneof - * @memberof jspb.test + * @interface jspb.test.ITestMessageWithOneof * @property {string} [pone] TestMessageWithOneof pone. * @property {string} [pthree] TestMessageWithOneof pthree. * @property {jspb.test.ITestMessageWithOneof} [rone] TestMessageWithOneof rone. @@ -5182,9 +5177,10 @@ $root.jspb = (function() { /** * Constructs a new TestMessageWithOneof. + * @exports jspb.test.TestMessageWithOneof + * @classdesc Represents a TestMessageWithOneof * @constructor * @param {jspb.test.ITestMessageWithOneof=} [properties] Properties to set - * @memberof jspb.test */ function TestMessageWithOneof(properties) { this.repeatedField = []; @@ -5420,7 +5416,7 @@ $root.jspb = (function() { /** * Verifies a TestMessageWithOneof message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TestMessageWithOneof.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -5607,17 +5603,17 @@ $root.jspb = (function() { /** * Properties of a TestEndsWithBytes. - * @interface ITestEndsWithBytes - * @memberof jspb.test + * @interface jspb.test.ITestEndsWithBytes * @property {number} [value] TestEndsWithBytes value. * @property {Uint8Array} [data] TestEndsWithBytes data. */ /** * Constructs a new TestEndsWithBytes. + * @exports jspb.test.TestEndsWithBytes + * @classdesc Represents a TestEndsWithBytes * @constructor * @param {jspb.test.ITestEndsWithBytes=} [properties] Properties to set - * @memberof jspb.test */ function TestEndsWithBytes(properties) { if (properties) @@ -5718,7 +5714,7 @@ $root.jspb = (function() { /** * Verifies a TestEndsWithBytes message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TestEndsWithBytes.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -5787,8 +5783,7 @@ $root.jspb = (function() { /** * Properties of a TestMapFieldsNoBinary. - * @interface ITestMapFieldsNoBinary - * @memberof jspb.test + * @interface jspb.test.ITestMapFieldsNoBinary * @property {Object.} [mapStringString] TestMapFieldsNoBinary mapStringString. * @property {Object.} [mapStringInt32] TestMapFieldsNoBinary mapStringInt32. * @property {Object.} [mapStringInt64] TestMapFieldsNoBinary mapStringInt64. @@ -5805,9 +5800,10 @@ $root.jspb = (function() { /** * Constructs a new TestMapFieldsNoBinary. + * @exports jspb.test.TestMapFieldsNoBinary + * @classdesc Represents a TestMapFieldsNoBinary * @constructor * @param {jspb.test.ITestMapFieldsNoBinary=} [properties] Properties to set - * @memberof jspb.test */ function TestMapFieldsNoBinary(properties) { this.mapStringString = {}; @@ -6099,7 +6095,7 @@ $root.jspb = (function() { /** * Verifies a TestMapFieldsNoBinary message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TestMapFieldsNoBinary.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -6441,9 +6437,7 @@ $root.jspb = (function() { /** * MapValueEnumNoBinary enum. - * @name MapValueEnumNoBinary - * @enum {number} - * @memberof jspb.test + * @enum {number} jspb.test.MapValueEnumNoBinary * @property {number} MAP_VALUE_FOO_NOBINARY=0 MAP_VALUE_FOO_NOBINARY value * @property {number} MAP_VALUE_BAR_NOBINARY=1 MAP_VALUE_BAR_NOBINARY value * @property {number} MAP_VALUE_BAZ_NOBINARY=2 MAP_VALUE_BAZ_NOBINARY value @@ -6460,16 +6454,16 @@ $root.jspb = (function() { /** * Properties of a MapValueMessageNoBinary. - * @interface IMapValueMessageNoBinary - * @memberof jspb.test + * @interface jspb.test.IMapValueMessageNoBinary * @property {number} [foo] MapValueMessageNoBinary foo. */ /** * Constructs a new MapValueMessageNoBinary. + * @exports jspb.test.MapValueMessageNoBinary + * @classdesc Represents a MapValueMessageNoBinary * @constructor * @param {jspb.test.IMapValueMessageNoBinary=} [properties] Properties to set - * @memberof jspb.test */ function MapValueMessageNoBinary(properties) { if (properties) @@ -6559,7 +6553,7 @@ $root.jspb = (function() { /** * Verifies a MapValueMessageNoBinary message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MapValueMessageNoBinary.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -6616,15 +6610,15 @@ $root.jspb = (function() { /** * Properties of a Deeply. - * @interface IDeeply - * @memberof jspb.test + * @interface jspb.test.IDeeply */ /** * Constructs a new Deeply. + * @exports jspb.test.Deeply + * @classdesc Represents a Deeply * @constructor * @param {jspb.test.IDeeply=} [properties] Properties to set - * @memberof jspb.test */ function Deeply(properties) { if (properties) @@ -6703,7 +6697,7 @@ $root.jspb = (function() { /** * Verifies a Deeply message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Deeply.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -6744,15 +6738,15 @@ $root.jspb = (function() { /** * Properties of a Nested. - * @interface INested - * @memberof jspb.test.Deeply + * @interface jspb.test.Deeply.INested */ /** * Constructs a new Nested. + * @exports jspb.test.Deeply.Nested + * @classdesc Represents a Nested * @constructor * @param {jspb.test.Deeply.INested=} [properties] Properties to set - * @memberof jspb.test.Deeply */ function Nested(properties) { if (properties) @@ -6831,7 +6825,7 @@ $root.jspb = (function() { /** * Verifies a Nested message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Nested.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -6872,16 +6866,16 @@ $root.jspb = (function() { /** * Properties of a Message. - * @interface IMessage - * @memberof jspb.test.Deeply.Nested + * @interface jspb.test.Deeply.Nested.IMessage * @property {number} [count] Message count. */ /** * Constructs a new Message. + * @exports jspb.test.Deeply.Nested.Message + * @classdesc Represents a Message * @constructor * @param {jspb.test.Deeply.Nested.IMessage=} [properties] Properties to set - * @memberof jspb.test.Deeply.Nested */ function Message(properties) { if (properties) @@ -6971,7 +6965,7 @@ $root.jspb = (function() { /** * Verifies a Message message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Message.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -7040,8 +7034,8 @@ $root.google = (function() { /** * Namespace google. + * @exports google * @namespace - * @name google */ var google = {}; @@ -7049,8 +7043,8 @@ $root.google = (function() { /** * Namespace protobuf. + * @exports google.protobuf * @namespace - * @memberof google */ var protobuf = {}; @@ -7058,16 +7052,16 @@ $root.google = (function() { /** * Properties of a FileDescriptorSet. - * @interface IFileDescriptorSet - * @memberof google.protobuf + * @interface google.protobuf.IFileDescriptorSet * @property {Array.} [file] FileDescriptorSet file. */ /** * Constructs a new FileDescriptorSet. + * @exports google.protobuf.FileDescriptorSet + * @classdesc Represents a FileDescriptorSet * @constructor * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @memberof google.protobuf */ function FileDescriptorSet(properties) { this.file = []; @@ -7161,7 +7155,7 @@ $root.google = (function() { /** * Verifies a FileDescriptorSet message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FileDescriptorSet.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -7235,8 +7229,7 @@ $root.google = (function() { /** * Properties of a FileDescriptorProto. - * @interface IFileDescriptorProto - * @memberof google.protobuf + * @interface google.protobuf.IFileDescriptorProto * @property {string} [name] FileDescriptorProto name. * @property {string} ["package"] FileDescriptorProto package. * @property {Array.} [dependency] FileDescriptorProto dependency. @@ -7253,9 +7246,10 @@ $root.google = (function() { /** * Constructs a new FileDescriptorProto. + * @exports google.protobuf.FileDescriptorProto + * @classdesc Represents a FileDescriptorProto * @constructor * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @memberof google.protobuf */ function FileDescriptorProto(properties) { this.dependency = []; @@ -7504,7 +7498,7 @@ $root.google = (function() { /** * Verifies a FileDescriptorProto message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FileDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -7766,8 +7760,7 @@ $root.google = (function() { /** * Properties of a DescriptorProto. - * @interface IDescriptorProto - * @memberof google.protobuf + * @interface google.protobuf.IDescriptorProto * @property {string} [name] DescriptorProto name. * @property {Array.} [field] DescriptorProto field. * @property {Array.} [extension] DescriptorProto extension. @@ -7782,9 +7775,10 @@ $root.google = (function() { /** * Constructs a new DescriptorProto. + * @exports google.protobuf.DescriptorProto + * @classdesc Represents a DescriptorProto * @constructor * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @memberof google.protobuf */ function DescriptorProto(properties) { this.field = []; @@ -8005,7 +7999,7 @@ $root.google = (function() { /** * Verifies a DescriptorProto message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ DescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -8270,17 +8264,17 @@ $root.google = (function() { /** * Properties of an ExtensionRange. - * @interface IExtensionRange - * @memberof google.protobuf.DescriptorProto + * @interface google.protobuf.DescriptorProto.IExtensionRange * @property {number} [start] ExtensionRange start. * @property {number} [end] ExtensionRange end. */ /** * Constructs a new ExtensionRange. + * @exports google.protobuf.DescriptorProto.ExtensionRange + * @classdesc Represents an ExtensionRange * @constructor * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @memberof google.protobuf.DescriptorProto */ function ExtensionRange(properties) { if (properties) @@ -8381,7 +8375,7 @@ $root.google = (function() { /** * Verifies an ExtensionRange message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ExtensionRange.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -8447,17 +8441,17 @@ $root.google = (function() { /** * Properties of a ReservedRange. - * @interface IReservedRange - * @memberof google.protobuf.DescriptorProto + * @interface google.protobuf.DescriptorProto.IReservedRange * @property {number} [start] ReservedRange start. * @property {number} [end] ReservedRange end. */ /** * Constructs a new ReservedRange. + * @exports google.protobuf.DescriptorProto.ReservedRange + * @classdesc Represents a ReservedRange * @constructor * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @memberof google.protobuf.DescriptorProto */ function ReservedRange(properties) { if (properties) @@ -8558,7 +8552,7 @@ $root.google = (function() { /** * Verifies a ReservedRange message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ReservedRange.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -8627,8 +8621,7 @@ $root.google = (function() { /** * Properties of a FieldDescriptorProto. - * @interface IFieldDescriptorProto - * @memberof google.protobuf + * @interface google.protobuf.IFieldDescriptorProto * @property {string} [name] FieldDescriptorProto name. * @property {number} [number] FieldDescriptorProto number. * @property {google.protobuf.FieldDescriptorProto.Label} [label] FieldDescriptorProto label. @@ -8643,9 +8636,10 @@ $root.google = (function() { /** * Constructs a new FieldDescriptorProto. + * @exports google.protobuf.FieldDescriptorProto + * @classdesc Represents a FieldDescriptorProto * @constructor * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @memberof google.protobuf */ function FieldDescriptorProto(properties) { if (properties) @@ -8834,7 +8828,7 @@ $root.google = (function() { /** * Verifies a FieldDescriptorProto message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FieldDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -9075,9 +9069,7 @@ $root.google = (function() { /** * Type enum. - * @name Type - * @enum {number} - * @memberof google.protobuf.FieldDescriptorProto + * @enum {number} google.protobuf.FieldDescriptorProto.Type * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value * @property {number} TYPE_INT64=3 TYPE_INT64 value @@ -9122,9 +9114,7 @@ $root.google = (function() { /** * Label enum. - * @name Label - * @enum {number} - * @memberof google.protobuf.FieldDescriptorProto + * @enum {number} google.protobuf.FieldDescriptorProto.Label * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value @@ -9144,17 +9134,17 @@ $root.google = (function() { /** * Properties of an OneofDescriptorProto. - * @interface IOneofDescriptorProto - * @memberof google.protobuf + * @interface google.protobuf.IOneofDescriptorProto * @property {string} [name] OneofDescriptorProto name. * @property {google.protobuf.IOneofOptions} [options] OneofDescriptorProto options. */ /** * Constructs a new OneofDescriptorProto. + * @exports google.protobuf.OneofDescriptorProto + * @classdesc Represents an OneofDescriptorProto * @constructor * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @memberof google.protobuf */ function OneofDescriptorProto(properties) { if (properties) @@ -9255,7 +9245,7 @@ $root.google = (function() { /** * Verifies an OneofDescriptorProto message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ OneofDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -9326,8 +9316,7 @@ $root.google = (function() { /** * Properties of an EnumDescriptorProto. - * @interface IEnumDescriptorProto - * @memberof google.protobuf + * @interface google.protobuf.IEnumDescriptorProto * @property {string} [name] EnumDescriptorProto name. * @property {Array.} [value] EnumDescriptorProto value. * @property {google.protobuf.IEnumOptions} [options] EnumDescriptorProto options. @@ -9335,9 +9324,10 @@ $root.google = (function() { /** * Constructs a new EnumDescriptorProto. + * @exports google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumDescriptorProto * @constructor * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @memberof google.protobuf */ function EnumDescriptorProto(properties) { this.value = []; @@ -9453,7 +9443,7 @@ $root.google = (function() { /** * Verifies an EnumDescriptorProto message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ EnumDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -9550,8 +9540,7 @@ $root.google = (function() { /** * Properties of an EnumValueDescriptorProto. - * @interface IEnumValueDescriptorProto - * @memberof google.protobuf + * @interface google.protobuf.IEnumValueDescriptorProto * @property {string} [name] EnumValueDescriptorProto name. * @property {number} [number] EnumValueDescriptorProto number. * @property {google.protobuf.IEnumValueOptions} [options] EnumValueDescriptorProto options. @@ -9559,9 +9548,10 @@ $root.google = (function() { /** * Constructs a new EnumValueDescriptorProto. + * @exports google.protobuf.EnumValueDescriptorProto + * @classdesc Represents an EnumValueDescriptorProto * @constructor * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @memberof google.protobuf */ function EnumValueDescriptorProto(properties) { if (properties) @@ -9673,7 +9663,7 @@ $root.google = (function() { /** * Verifies an EnumValueDescriptorProto message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ EnumValueDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -9752,8 +9742,7 @@ $root.google = (function() { /** * Properties of a ServiceDescriptorProto. - * @interface IServiceDescriptorProto - * @memberof google.protobuf + * @interface google.protobuf.IServiceDescriptorProto * @property {string} [name] ServiceDescriptorProto name. * @property {Array.} [method] ServiceDescriptorProto method. * @property {google.protobuf.IServiceOptions} [options] ServiceDescriptorProto options. @@ -9761,9 +9750,10 @@ $root.google = (function() { /** * Constructs a new ServiceDescriptorProto. + * @exports google.protobuf.ServiceDescriptorProto + * @classdesc Represents a ServiceDescriptorProto * @constructor * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @memberof google.protobuf */ function ServiceDescriptorProto(properties) { this.method = []; @@ -9879,7 +9869,7 @@ $root.google = (function() { /** * Verifies a ServiceDescriptorProto message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ServiceDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -9976,8 +9966,7 @@ $root.google = (function() { /** * Properties of a MethodDescriptorProto. - * @interface IMethodDescriptorProto - * @memberof google.protobuf + * @interface google.protobuf.IMethodDescriptorProto * @property {string} [name] MethodDescriptorProto name. * @property {string} [inputType] MethodDescriptorProto inputType. * @property {string} [outputType] MethodDescriptorProto outputType. @@ -9988,9 +9977,10 @@ $root.google = (function() { /** * Constructs a new MethodDescriptorProto. + * @exports google.protobuf.MethodDescriptorProto + * @classdesc Represents a MethodDescriptorProto * @constructor * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @memberof google.protobuf */ function MethodDescriptorProto(properties) { if (properties) @@ -10135,7 +10125,7 @@ $root.google = (function() { /** * Verifies a MethodDescriptorProto message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MethodDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -10238,8 +10228,7 @@ $root.google = (function() { /** * Properties of a FileOptions. - * @interface IFileOptions - * @memberof google.protobuf + * @interface google.protobuf.IFileOptions * @property {string} [javaPackage] FileOptions javaPackage. * @property {string} [javaOuterClassname] FileOptions javaOuterClassname. * @property {boolean} [javaMultipleFiles] FileOptions javaMultipleFiles. @@ -10259,9 +10248,10 @@ $root.google = (function() { /** * Constructs a new FileOptions. + * @exports google.protobuf.FileOptions + * @classdesc Represents a FileOptions * @constructor * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @memberof google.protobuf */ function FileOptions(properties) { this.uninterpretedOption = []; @@ -10509,7 +10499,7 @@ $root.google = (function() { /** * Verifies a FileOptions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FileOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -10710,9 +10700,7 @@ $root.google = (function() { /** * OptimizeMode enum. - * @name OptimizeMode - * @enum {number} - * @memberof google.protobuf.FileOptions + * @enum {number} google.protobuf.FileOptions.OptimizeMode * @property {number} SPEED=1 SPEED value * @property {number} CODE_SIZE=2 CODE_SIZE value * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value @@ -10732,8 +10720,7 @@ $root.google = (function() { /** * Properties of a MessageOptions. - * @interface IMessageOptions - * @memberof google.protobuf + * @interface google.protobuf.IMessageOptions * @property {boolean} [messageSetWireFormat] MessageOptions messageSetWireFormat. * @property {boolean} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor. * @property {boolean} [deprecated] MessageOptions deprecated. @@ -10743,9 +10730,10 @@ $root.google = (function() { /** * Constructs a new MessageOptions. + * @exports google.protobuf.MessageOptions + * @classdesc Represents a MessageOptions * @constructor * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @memberof google.protobuf */ function MessageOptions(properties) { this.uninterpretedOption = []; @@ -10883,7 +10871,7 @@ $root.google = (function() { /** * Verifies a MessageOptions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MessageOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -10991,8 +10979,7 @@ $root.google = (function() { /** * Properties of a FieldOptions. - * @interface IFieldOptions - * @memberof google.protobuf + * @interface google.protobuf.IFieldOptions * @property {google.protobuf.FieldOptions.CType} [ctype] FieldOptions ctype. * @property {boolean} [packed] FieldOptions packed. * @property {google.protobuf.FieldOptions.JSType} [jstype] FieldOptions jstype. @@ -11004,9 +10991,10 @@ $root.google = (function() { /** * Constructs a new FieldOptions. + * @exports google.protobuf.FieldOptions + * @classdesc Represents a FieldOptions * @constructor * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @memberof google.protobuf */ function FieldOptions(properties) { this.uninterpretedOption = []; @@ -11166,7 +11154,7 @@ $root.google = (function() { /** * Verifies a FieldOptions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FieldOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -11321,9 +11309,7 @@ $root.google = (function() { /** * CType enum. - * @name CType - * @enum {number} - * @memberof google.protobuf.FieldOptions + * @enum {number} google.protobuf.FieldOptions.CType * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value @@ -11338,9 +11324,7 @@ $root.google = (function() { /** * JSType enum. - * @name JSType - * @enum {number} - * @memberof google.protobuf.FieldOptions + * @enum {number} google.protobuf.FieldOptions.JSType * @property {number} JS_NORMAL=0 JS_NORMAL value * @property {number} JS_STRING=1 JS_STRING value * @property {number} JS_NUMBER=2 JS_NUMBER value @@ -11360,16 +11344,16 @@ $root.google = (function() { /** * Properties of an OneofOptions. - * @interface IOneofOptions - * @memberof google.protobuf + * @interface google.protobuf.IOneofOptions * @property {Array.} [uninterpretedOption] OneofOptions uninterpretedOption. */ /** * Constructs a new OneofOptions. + * @exports google.protobuf.OneofOptions + * @classdesc Represents an OneofOptions * @constructor * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @memberof google.protobuf */ function OneofOptions(properties) { this.uninterpretedOption = []; @@ -11463,7 +11447,7 @@ $root.google = (function() { /** * Verifies an OneofOptions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ OneofOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -11537,8 +11521,7 @@ $root.google = (function() { /** * Properties of an EnumOptions. - * @interface IEnumOptions - * @memberof google.protobuf + * @interface google.protobuf.IEnumOptions * @property {boolean} [allowAlias] EnumOptions allowAlias. * @property {boolean} [deprecated] EnumOptions deprecated. * @property {Array.} [uninterpretedOption] EnumOptions uninterpretedOption. @@ -11547,9 +11530,10 @@ $root.google = (function() { /** * Constructs a new EnumOptions. + * @exports google.protobuf.EnumOptions + * @classdesc Represents an EnumOptions * @constructor * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @memberof google.protobuf */ function EnumOptions(properties) { this.uninterpretedOption = []; @@ -11676,7 +11660,7 @@ $root.google = (function() { /** * Verifies an EnumOptions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ EnumOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -11776,17 +11760,17 @@ $root.google = (function() { /** * Properties of an EnumValueOptions. - * @interface IEnumValueOptions - * @memberof google.protobuf + * @interface google.protobuf.IEnumValueOptions * @property {boolean} [deprecated] EnumValueOptions deprecated. * @property {Array.} [uninterpretedOption] EnumValueOptions uninterpretedOption. */ /** * Constructs a new EnumValueOptions. + * @exports google.protobuf.EnumValueOptions + * @classdesc Represents an EnumValueOptions * @constructor * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @memberof google.protobuf */ function EnumValueOptions(properties) { this.uninterpretedOption = []; @@ -11891,7 +11875,7 @@ $root.google = (function() { /** * Verifies an EnumValueOptions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ EnumValueOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -11974,17 +11958,17 @@ $root.google = (function() { /** * Properties of a ServiceOptions. - * @interface IServiceOptions - * @memberof google.protobuf + * @interface google.protobuf.IServiceOptions * @property {boolean} [deprecated] ServiceOptions deprecated. * @property {Array.} [uninterpretedOption] ServiceOptions uninterpretedOption. */ /** * Constructs a new ServiceOptions. + * @exports google.protobuf.ServiceOptions + * @classdesc Represents a ServiceOptions * @constructor * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @memberof google.protobuf */ function ServiceOptions(properties) { this.uninterpretedOption = []; @@ -12089,7 +12073,7 @@ $root.google = (function() { /** * Verifies a ServiceOptions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ServiceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -12172,8 +12156,7 @@ $root.google = (function() { /** * Properties of a MethodOptions. - * @interface IMethodOptions - * @memberof google.protobuf + * @interface google.protobuf.IMethodOptions * @property {boolean} [deprecated] MethodOptions deprecated. * @property {google.protobuf.MethodOptions.IdempotencyLevel} [idempotencyLevel] MethodOptions idempotencyLevel. * @property {Array.} [uninterpretedOption] MethodOptions uninterpretedOption. @@ -12181,9 +12164,10 @@ $root.google = (function() { /** * Constructs a new MethodOptions. + * @exports google.protobuf.MethodOptions + * @classdesc Represents a MethodOptions * @constructor * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @memberof google.protobuf */ function MethodOptions(properties) { this.uninterpretedOption = []; @@ -12299,7 +12283,7 @@ $root.google = (function() { /** * Verifies a MethodOptions message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MethodOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -12404,9 +12388,7 @@ $root.google = (function() { /** * IdempotencyLevel enum. - * @name IdempotencyLevel - * @enum {number} - * @memberof google.protobuf.MethodOptions + * @enum {number} google.protobuf.MethodOptions.IdempotencyLevel * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value * @property {number} IDEMPOTENT=2 IDEMPOTENT value @@ -12426,8 +12408,7 @@ $root.google = (function() { /** * Properties of an UninterpretedOption. - * @interface IUninterpretedOption - * @memberof google.protobuf + * @interface google.protobuf.IUninterpretedOption * @property {Array.} [name] UninterpretedOption name. * @property {string} [identifierValue] UninterpretedOption identifierValue. * @property {number|Long} [positiveIntValue] UninterpretedOption positiveIntValue. @@ -12439,9 +12420,10 @@ $root.google = (function() { /** * Constructs a new UninterpretedOption. + * @exports google.protobuf.UninterpretedOption + * @classdesc Represents an UninterpretedOption * @constructor * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @memberof google.protobuf */ function UninterpretedOption(properties) { this.name = []; @@ -12601,7 +12583,7 @@ $root.google = (function() { /** * Verifies an UninterpretedOption message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ UninterpretedOption.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -12753,17 +12735,17 @@ $root.google = (function() { /** * Properties of a NamePart. - * @interface INamePart - * @memberof google.protobuf.UninterpretedOption + * @interface google.protobuf.UninterpretedOption.INamePart * @property {string} namePart NamePart namePart. * @property {boolean} isExtension NamePart isExtension. */ /** * Constructs a new NamePart. + * @exports google.protobuf.UninterpretedOption.NamePart + * @classdesc Represents a NamePart * @constructor * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @memberof google.protobuf.UninterpretedOption */ function NamePart(properties) { if (properties) @@ -12866,7 +12848,7 @@ $root.google = (function() { /** * Verifies a NamePart message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ NamePart.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -12933,16 +12915,16 @@ $root.google = (function() { /** * Properties of a SourceCodeInfo. - * @interface ISourceCodeInfo - * @memberof google.protobuf + * @interface google.protobuf.ISourceCodeInfo * @property {Array.} [location] SourceCodeInfo location. */ /** * Constructs a new SourceCodeInfo. + * @exports google.protobuf.SourceCodeInfo + * @classdesc Represents a SourceCodeInfo * @constructor * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @memberof google.protobuf */ function SourceCodeInfo(properties) { this.location = []; @@ -13036,7 +13018,7 @@ $root.google = (function() { /** * Verifies a SourceCodeInfo message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SourceCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -13107,8 +13089,7 @@ $root.google = (function() { /** * Properties of a Location. - * @interface ILocation - * @memberof google.protobuf.SourceCodeInfo + * @interface google.protobuf.SourceCodeInfo.ILocation * @property {Array.} [path] Location path. * @property {Array.} [span] Location span. * @property {string} [leadingComments] Location leadingComments. @@ -13118,9 +13099,10 @@ $root.google = (function() { /** * Constructs a new Location. + * @exports google.protobuf.SourceCodeInfo.Location + * @classdesc Represents a Location * @constructor * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @memberof google.protobuf.SourceCodeInfo */ function Location(properties) { this.path = []; @@ -13282,7 +13264,7 @@ $root.google = (function() { /** * Verifies a Location message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Location.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -13413,16 +13395,16 @@ $root.google = (function() { /** * Properties of a GeneratedCodeInfo. - * @interface IGeneratedCodeInfo - * @memberof google.protobuf + * @interface google.protobuf.IGeneratedCodeInfo * @property {Array.} [annotation] GeneratedCodeInfo annotation. */ /** * Constructs a new GeneratedCodeInfo. + * @exports google.protobuf.GeneratedCodeInfo + * @classdesc Represents a GeneratedCodeInfo * @constructor * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @memberof google.protobuf */ function GeneratedCodeInfo(properties) { this.annotation = []; @@ -13516,7 +13498,7 @@ $root.google = (function() { /** * Verifies a GeneratedCodeInfo message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GeneratedCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) @@ -13587,8 +13569,7 @@ $root.google = (function() { /** * Properties of an Annotation. - * @interface IAnnotation - * @memberof google.protobuf.GeneratedCodeInfo + * @interface google.protobuf.GeneratedCodeInfo.IAnnotation * @property {Array.} [path] Annotation path. * @property {string} [sourceFile] Annotation sourceFile. * @property {number} [begin] Annotation begin. @@ -13597,9 +13578,10 @@ $root.google = (function() { /** * Constructs a new Annotation. + * @exports google.protobuf.GeneratedCodeInfo.Annotation + * @classdesc Represents an Annotation * @constructor * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @memberof google.protobuf.GeneratedCodeInfo */ function Annotation(properties) { this.path = []; @@ -13734,7 +13716,7 @@ $root.google = (function() { /** * Verifies an Annotation message. * @param {Object.} message Plain object to verify - * @returns {?string} `null` if valid, otherwise the reason why it is not + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Annotation.verify = function verify(message) { if (typeof message !== "object" || message === null)