@@ -394,9 +394,9 @@ function buildType(ref, type) {
394394 jsType = "(" + jsType + "|null)" ;
395395 pushComment ( [
396396 field . comment || type . name + " " + field . name + "." ,
397+ "@member {" + jsType + "}" + escapeName ( field . name ) ,
397398 "@memberof " + exportName ( type ) ,
398- "@instance" ,
399- "@type {" + jsType + "}"
399+ "@instance"
400400 ] ) ;
401401 } else if ( firstField ) {
402402 push ( "" ) ;
@@ -432,10 +432,9 @@ function buildType(ref, type) {
432432 push ( "" ) ;
433433 pushComment ( [
434434 oneof . comment || type . name + " " + oneof . name + "." ,
435- "@property " + escapeName ( oneof . name ) ,
435+ "@member {string|undefined} " + escapeName ( oneof . name ) ,
436436 "@memberof " + exportName ( type ) ,
437- "@instance" ,
438- "@type {string|undefined}"
437+ "@instance"
439438 ] ) ;
440439 push ( "Object.defineProperty(" + escapeName ( type . name ) + ".prototype, " + JSON . stringify ( oneof . name ) + ", {" ) ;
441440 ++ indent ;
@@ -449,6 +448,7 @@ function buildType(ref, type) {
449448 push ( "" ) ;
450449 pushComment ( [
451450 "Creates a new " + type . name + " instance using the specified properties." ,
451+ "@function create" ,
452452 "@memberof " + exportName ( type ) ,
453453 "@static" ,
454454 "@param {" + exportName ( type , true ) + "=} [properties] Properties to set" ,
@@ -465,6 +465,7 @@ function buildType(ref, type) {
465465 push ( "" ) ;
466466 pushComment ( [
467467 "Encodes the specified " + type . name + " message. Does not implicitly {@link " + exportName ( type ) + ".verify|verify} messages." ,
468+ "@function encode" ,
468469 "@memberof " + exportName ( type ) ,
469470 "@static" ,
470471 "@param {" + exportName ( type , ! config . forceMessage ) + "} " + ( config . beautify ? "message" : "m" ) + " " + type . name + " message or plain object to encode" ,
@@ -477,6 +478,7 @@ function buildType(ref, type) {
477478 push ( "" ) ;
478479 pushComment ( [
479480 "Encodes the specified " + type . name + " message, length delimited. Does not implicitly {@link " + exportName ( type ) + ".verify|verify} messages." ,
481+ "@function encodeDelimited" ,
480482 "@memberof " + exportName ( type ) ,
481483 "@static" ,
482484 "@param {" + exportName ( type , ! config . forceMessage ) + "} message " + type . name + " message or plain object to encode" ,
@@ -495,6 +497,7 @@ function buildType(ref, type) {
495497 push ( "" ) ;
496498 pushComment ( [
497499 "Decodes " + aOrAn ( type . name ) + " message from the specified reader or buffer." ,
500+ "@function decode" ,
498501 "@memberof " + exportName ( type ) ,
499502 "@static" ,
500503 "@param {$protobuf.Reader|Uint8Array} " + ( config . beautify ? "reader" : "r" ) + " Reader or buffer to decode from" ,
@@ -509,6 +512,7 @@ function buildType(ref, type) {
509512 push ( "" ) ;
510513 pushComment ( [
511514 "Decodes " + aOrAn ( type . name ) + " message from the specified reader or buffer, length delimited." ,
515+ "@function decodeDelimited" ,
512516 "@memberof " + exportName ( type ) ,
513517 "@static" ,
514518 "@param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from" ,
@@ -532,6 +536,7 @@ function buildType(ref, type) {
532536 push ( "" ) ;
533537 pushComment ( [
534538 "Verifies " + aOrAn ( type . name ) + " message." ,
539+ "@function verify" ,
535540 "@memberof " + exportName ( type ) ,
536541 "@static" ,
537542 "@param {Object.<string,*>} " + ( config . beautify ? "message" : "m" ) + " Plain object to verify" ,
@@ -544,6 +549,7 @@ function buildType(ref, type) {
544549 push ( "" ) ;
545550 pushComment ( [
546551 "Creates " + aOrAn ( type . name ) + " message from a plain object. Also converts values to their respective internal types." ,
552+ "@function fromObject" ,
547553 "@memberof " + exportName ( type ) ,
548554 "@static" ,
549555 "@param {Object.<string,*>} " + ( config . beautify ? "object" : "d" ) + " Plain object" ,
@@ -554,6 +560,7 @@ function buildType(ref, type) {
554560 push ( "" ) ;
555561 pushComment ( [
556562 "Creates a plain object from " + aOrAn ( type . name ) + " message. Also converts values to other types if specified." ,
563+ "@function toObject" ,
557564 "@memberof " + exportName ( type ) ,
558565 "@static" ,
559566 "@param {" + exportName ( type ) + "} " + ( config . beautify ? "message" : "m" ) + " " + type . name ,
@@ -565,6 +572,7 @@ function buildType(ref, type) {
565572 push ( "" ) ;
566573 pushComment ( [
567574 "Converts this " + type . name + " to JSON." ,
575+ "@function toJSON" ,
568576 "@memberof " + exportName ( type ) ,
569577 "@instance" ,
570578 "@returns {Object.<string,*>} JSON object"
@@ -602,6 +610,7 @@ function buildService(ref, service) {
602610 push ( "" ) ;
603611 pushComment ( [
604612 "Creates new " + service . name + " service using the specified rpc implementation." ,
613+ "@function create" ,
605614 "@memberof " + exportName ( service ) ,
606615 "@static" ,
607616 "@param {$protobuf.RPCImpl} rpcImpl RPC implementation" ,
@@ -633,6 +642,7 @@ function buildService(ref, service) {
633642 push ( "" ) ;
634643 pushComment ( [
635644 method . comment || "Calls " + method . name + "." ,
645+ "@function " + util . safeProp ( lcName ) ,
636646 "@memberof " + exportName ( service ) ,
637647 "@instance" ,
638648 "@param {" + exportName ( method . resolvedRequestType , ! config . forceMessage ) + "} request " + method . resolvedRequestType . name + " message or plain object" ,
0 commit comments