123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933 |
- /*
- * Copyright 2012 The Closure Compiler Authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- /**
- * @fileoverview Externs for ProtoBuf.js.
- * @see https://github.com/dcodeIO/ProtoBuf.js
- * @externs
- */
- /**
- BEGIN_NODE_INCLUDE
- var ProtoBuf = require('protobufjs');
- END_NODE_INCLUDE
- */
- /**
- * @typedef {Array}
- */
- var Buffer;
- /**
- * @typedef {Object}
- */
- var dcodeIO;
- /**
- * {@type Object.<string.*>}
- */
- var ProtoBuf = {};
- /**
- * @type {string}
- * @const
- */
- ProtoBuf.VERSION;
- /**
- * @type {!Object.<string,number>}
- * @const
- */
- ProtoBuf.WIRE_TYPES = {};
- /**
- * @type {number}
- * @const
- */
- ProtoBuf.WIRE_TYPES.VARINT;
- /**
- * @type {number}
- * @const
- */
- ProtoBuf.WIRE_TYPES.BITS64;
- /**
- * @type {number}
- * @const
- */
- ProtoBuf.WIRE_TYPES.LDELIM;
- /**
- * @type {number}
- * @const
- */
- ProtoBuf.WIRE_TYPES.STARTGROUP;
- /**
- * @type {number}
- * @const
- */
- ProtoBuf.WIRE_TYPES.ENDGROUP;
- /**
- * @type {number}
- * @const
- */
- ProtoBuf.WIRE_TYPES.BITS32;
- /**
- * @type {!Array.<number>}
- * @const
- */
- ProtoBuf.PACKABLE_WIRE_TYPES;
- /**
- * @type {boolean}
- */
- ProtoBuf.convertFieldsToCamelCase;
- /**
- * @type {boolean}
- */
- ProtoBuf.populateAccessors;
- /**
- * @dict
- * @type {!Object<string,{name: string, wireType: number}>}
- * @const
- */
- ProtoBuf.TYPES;
- /**
- * @type {number}
- */
- ProtoBuf.ID_MIN;
- /**
- * @type {number}
- */
- ProtoBuf.ID_MAX;
- /**
- * @type {!function(new: ByteBuffer, ...*)}
- */
- ProtoBuf.ByteBuffer;
- /**
- * @type {?function(new: Long, ...*)}
- */
- ProtoBuf.Long;
- /**
- * @type {!Object<string,string|RegExp>}
- */
- ProtoBuf.Lang;
- /**
- * @type {Object<string, function(*)>}
- */
- ProtoBuf.DotProto;
- /**
- * @param {string} proto
- * @constructor
- */
- ProtoBuf.DotProto.Tokenizer = function(proto) {};
- /**
- * @type {string}
- */
- ProtoBuf.DotProto.Tokenizer.prototype.source;
- /**
- * @type {number}
- */
- ProtoBuf.DotProto.Tokenizer.prototype.index;
- /**
- * @type {number}
- */
- ProtoBuf.DotProto.Tokenizer.prototype.line;
- /**
- * @type {Array.<string>}
- */
- ProtoBuf.DotProto.Tokenizer.prototype.stack;
- /**
- * @type {boolean}
- */
- ProtoBuf.DotProto.Tokenizer.prototype.readingString;
- /**
- * @return {?string}
- * @throws {Error}
- */
- ProtoBuf.DotProto.Tokenizer.prototype.next = function() {};
- /**
- * @return {?string}
- * @throws {Error}
- */
- ProtoBuf.DotProto.Tokenizer.prototype.peek = function() {};
- /**
- * @return {string}
- * @nosideeffects
- */
- ProtoBuf.DotProto.Tokenizer.prototype.toString = function() {};
- /**
- * @param {string} proto
- * @constructor
- */
- ProtoBuf.DotProto.Parser = function(proto) {};
- /**
- * @type {!ProtoBuf.DotProto.Tokenizer}
- */
- ProtoBuf.DotProto.Parser.prototype.tn;
- /**
- * @return {{package: (string|null), messages: Array.<Object>, enums: Array.<Object>, imports: Array.<string>, options: Object<string,*>}}
- * @throws {Error}
- */
- ProtoBuf.DotProto.Parser.prototype.parse = function() {};
- /**
- * @return {string}
- * @nosideeffects
- */
- ProtoBuf.DotProto.Parser.prototype.toString = function() {};
- /**
- * @type {Object<string, function(*)>}
- */
- ProtoBuf.Reflect.Reflect = {};
- /**
- * @constructor
- * @param {ProtoBuf.Reflect.T} parent
- * @param {string} name Object name
- */
- ProtoBuf.Reflect.T = function(parent, name) {};
- /**
- * @type {?ProtoBuf.Reflect.T}
- */
- ProtoBuf.Reflect.T.prototype.parent;
- /**
- * @type {string}
- */
- ProtoBuf.Reflect.T.prototype.name;
- /**
- * @returns {string}
- * @nosideeffects
- */
- ProtoBuf.Reflect.T.prototype.fqn = function() {};
- /**
- * @param {boolean=} includeClass
- * @returns {string}
- * @nosideeffects
- */
- ProtoBuf.Reflect.T.prototype.toString = function(includeClass) {};
- /**
- * @throws {Error}
- */
- ProtoBuf.Reflect.T.prototype.build = function() {};
- /**
- * @param {?ProtoBuf.Reflect.Namespace} parent
- * @param {string} name
- * @constructor
- * @extends ProtoBuf.Reflect.T
- */
- ProtoBuf.Reflect.Namespace = function(parent, name) {};
- /**
- * @type {Array.<ProtoBuf.Reflect.T>}
- */
- ProtoBuf.Reflect.Namespace.prototype.children;
- /**
- * @param {ProtoBuf.Reflect.T=} type
- * @return {Array.<ProtoBuf.Reflect.T>}
- * @nosideeffects
- */
- ProtoBuf.Reflect.Namespace.prototype.getChildren = function(type) {};
- /**
- * @param {ProtoBuf.Reflect.T} child
- * @throws {Error}
- */
- ProtoBuf.Reflect.Namespace.prototype.addChild = function(child) {};
- /**
- * @param {string|number} nameOrId
- * @returns {boolean}
- * @nosideeffects
- */
- ProtoBuf.Reflect.Namespace.prototype.hasChild = function(nameOrId) {};
- /**
- * @param {string|number} nameOrId
- * @return {?ProtoBuf.Reflect.T}
- * @nosideeffects
- */
- ProtoBuf.Reflect.Namespace.prototype.getChild = function(nameOrId) {};
- /**
- * @param {string} qn
- * @param {boolean=} excludeFields
- * @return {?ProtoBuf.Reflect.Namespace}
- * @nosideeffects
- */
- ProtoBuf.Reflect.Namespace.prototype.resolve = function(qn, excludeFields) {};
- /**
- * @return {Object.<string,Function|Object>}
- */
- ProtoBuf.Reflect.Namespace.prototype.build = function() {};
- /**
- * @param {!ProtoBuf.Reflect.Namespace} parent
- * @param {string} name
- * @constructor
- * @extends ProtoBuf.Reflect.Namespace
- */
- ProtoBuf.Reflect.Message = function(parent, name) {};
- /**
- * @type {?Array.<number>}
- */
- ProtoBuf.Reflect.Message.prototype.extensions;
- /**
- * @type {?ProtoBuf.Builder.Message}
- */
- ProtoBuf.Reflect.Message.prototype.clazz;
- /**
- * @return {!ProtoBuf.Builder.Message}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.prototype.build = function() {};
- /**
- * @param {!ProtoBuf.Builder.Message} message
- * @param {!ByteBuffer} buffer
- * @return {!ByteBuffer}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.prototype.encode = function(message, buffer) {};
- /**
- * @param {!ProtoBuf.Builder.Message} message
- * @return {number}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.prototype.calculate = function(message) {};
- /**
- * @param {!ProtoBuf.Builder.Message} message
- * @param {!ByteBuffer} buffer
- * @param {boolean} noVerify
- * @return {!ByteBuffer}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.prototype.encodeDelimited = function(message, buffer, noVerify) {};
- /**
- * @param {!ByteBuffer} buffer
- * @param {number=} length
- * @return {!ProtoBuf.Builder.Message}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.prototype.decode = function(buffer, length) {};
- /**
- * @param {!ByteBuffer} buffer
- * @param {number=} length
- * @return {!ProtoBuf.Builder.Message}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.prototype.decodeDelimited = function(buffer, length) {};
- /**
- * @param {!ProtoBuf.Reflect.Message} message
- * @param {string} rule
- * @param {string} type
- * @param {string} name
- * @param {number} id
- * @param {Object<string>=} options
- * @constructor
- * @extends ProtoBuf.Reflect.T
- */
- ProtoBuf.Reflect.Message.Field = function(message, rule, type, name, id, options) {};
- /**
- * @type {boolean}
- */
- ProtoBuf.Reflect.Message.Field.prototype.required;
- /**
- * @type {boolean}
- */
- ProtoBuf.Reflect.Message.Field.prototype.repeated;
- /**
- * @type {string|{name: string, wireType: number}}
- */
- ProtoBuf.Reflect.Message.Field.prototype.type;
- /**
- * @type {number}
- */
- ProtoBuf.Reflect.Message.Field.prototype.id;
- /**
- * @type {!Object.<string,*>}
- */
- ProtoBuf.Reflect.Message.Field.prototype.options;
- /**
- * @type {?ProtoBuf.Reflect.T}
- */
- ProtoBuf.Reflect.Message.Field.prototype.resolvedType;
- /**
- * @type {string}
- */
- ProtoBuf.Reflect.Message.Field.prototype.originalName;
- /**
- * @param {*} value
- * @param {boolean=} skipRepeated
- * @return {*}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Reflect.Message.Field.prototype.verifyValue = function(value, skipRepeated) {};
- /**
- * @param {*} value
- * @param {!ByteBuffer} buffer
- * @return {!ByteBuffer}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.Field.prototype.encode = function(value, buffer) {};
- /**
- * @param {*} value
- * @return {number}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Reflect.Message.Field.prototype.calculate = function(value) {};
- /**
- * @param {number} wireType
- * @param {!ByteBuffer} buffer
- * @return {*}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.Field.prototype.decode = function(wireType, buffer) {};
- /**
- * @param {*} value
- * @param {!ByteBuffer} buffer
- * @return {!ByteBuffer}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Message.Field.prototype.encodeValue = function(value, buffer) {};
- /**
- * @param {!ProtoBuf.Reflect.T} parent
- * @param {string} name
- * @constructor
- * @extends ProtoBuf.Reflect.Namespace
- */
- ProtoBuf.Reflect.Enum = function(parent, name) {};
- /**
- * @return {Object<string,*>}
- */
- ProtoBuf.Reflect.Enum.prototype.build = function() {};
- /**
- * @type {?Object.<string,number>}
- */
- ProtoBuf.Reflect.Enum.prototype.object;
- /**
- * @param {!ProtoBuf.Reflect.Enum} enm
- * @param {string} name
- * @param {number} id
- * @constructor
- * @extends ProtoBuf.Reflect.T
- */
- ProtoBuf.Reflect.Enum.Value = function(enm, name, id) {};
- /**
- * @type {number}
- */
- ProtoBuf.Reflect.Enum.Value.prototype.id;
- /**
- * @param {!ProtoBuf.Reflect.Namespace} root
- * @param {string} name Service name
- * @param {Object.<string,*>=} options
- * @constructor
- * @extends ProtoBuf.Reflect.Namespace
- */
- ProtoBuf.Reflect.Service = function(root, name, options) {};
- /**
- * @type {ProtoBuf.Builder.Service}
- */
- ProtoBuf.Reflect.Service.prototype.clazz;
- /**
- * @return {!ProtoBuf.Builder.Service}
- * @throws {Error}
- */
- ProtoBuf.Reflect.Service.prototype.build = function() {};
- /**
- * @param {!ProtoBuf.Reflect.Service} svc
- * @param {string} name
- * @param {Object.<string,*>=} options
- * @constructor
- * @extends ProtoBuf.Reflect.T
- */
- ProtoBuf.Reflect.Service.Method = function(svc, name, options) {};
- /**
- * @return {Object.<string,*>}
- */
- ProtoBuf.Reflect.Service.Method.prototype.buildOpt = function() {};
- /**
- * @param {!ProtoBuf.Reflect.Service} svc
- * @param {string} name
- * @param {string} request
- * @param {string} response
- * @param {Object.<string,*>=} options
- * @constructor
- * @extends ProtoBuf.Reflect.Service.Method
- */
- ProtoBuf.Reflect.Service.RPCMethod = function(svc, name, request, response, options) {};
- /**
- * @type {string}
- */
- ProtoBuf.Reflect.Service.RPCMethod.prototype.requestName;
- /**
- * @type {string}
- */
- ProtoBuf.Reflect.Service.RPCMethod.prototype.responseName;
- /**
- * @type {ProtoBuf.Reflect.Message}
- */
- ProtoBuf.Reflect.Service.RPCMethod.prototype.resolvedRequestType;
- /**
- * @type {ProtoBuf.Reflect.Message}
- */
- ProtoBuf.Reflect.Service.RPCMethod.prototype.resolvedResponseType;
- /**
- * @constructor
- */
- ProtoBuf.Builder = function() {};
- /**
- * @type {!ProtoBuf.Reflect.Namespace}
- */
- ProtoBuf.Builder.prototype.ns;
- /**
- * @type {?ProtoBuf.Reflect.T}
- */
- ProtoBuf.Builder.prototype.ptr;
- /**
- * @type {boolean}
- */
- ProtoBuf.Builder.prototype.resolved;
- /**
- * @type {Object.<string,ProtoBuf.Builder.Message|Object>|null}
- */
- ProtoBuf.Builder.prototype.result;
- /**
- * @type {Array.<string>}
- */
- ProtoBuf.Builder.prototype.files;
- /**
- * @type {?string}
- */
- ProtoBuf.Builder.prototype.importRoot;
- /**
- */
- ProtoBuf.Builder.prototype.reset = function() {};
- /**
- * @param {string} pkg
- * @return {!ProtoBuf.Builder}
- * @throws {Error}
- */
- ProtoBuf.Builder.prototype.define = function(pkg) {};
- /**
- * @param {Object.<string,*>} def
- * @return {boolean}
- * @nosideeffects
- */
- ProtoBuf.Builder.isValidMessage = function(def) {};
- /**
- * @param {Object.<string,*>} def
- * @return {boolean}
- * @nosideeffects
- */
- ProtoBuf.Builder.isValidMessageField = function(def) {};
- /**
- * @param {Object.<string,*>} def
- * @return {boolean}
- */
- ProtoBuf.Builder.isValidEnum = function(def) {};
- /**
- * @param {Object.<string,*>} def
- * @return {boolean}
- */
- ProtoBuf.Builder.isValidService = function(def) {};
- /**
- * @param {Object.<string,*>} def
- * @return {boolean}
- */
- ProtoBuf.Builder.isValidExtend = function(def) {};
- /**
- * @param {Array.<Object.<string,*>>} messages
- * @return {ProtoBuf.Builder}
- * @throws {Error}
- */
- ProtoBuf.Builder.prototype.create = function(messages) {};
- /**
- * @name ProtoBuf.Builder.prototype.import
- * @function
- * @param {ProtoBuf.Builder} builder
- * @param {(string|{root: string, file: string})=} filename
- * @return {!ProtoBuf.Builder}
- * @throws {Error}
- */
- ProtoBuf.Builder.prototype["import"] = function(builder, filename) {};
- /**
- * @throws {Error}
- */
- ProtoBuf.Builder.prototype.resolveAll = function() {};
- /**
- * @param {string=} path
- * @return {ProtoBuf.Builder.Message|Object.<string,*>}
- * @throws {Error}
- */
- ProtoBuf.Builder.prototype.build = function(path) {};
- /**
- * @param {string=} path
- * @return {?ProtoBuf.Reflect.T}
- */
- ProtoBuf.Builder.prototype.lookup = function(path) {};
- /**
- * @return {string}
- * @nosideeffects
- */
- ProtoBuf.Builder.prototype.toString = function() {};
- /**
- * @param {Object.<string,*>} values
- * @constructor
- * @throws {Error}
- */
- ProtoBuf.Builder.Message = function(values) {};
- /**
- * @param {string} key
- * @param {*} value
- * @param {boolean=} noAssert
- * @throws {Error}
- */
- ProtoBuf.Builder.Message.prototype.add = function(key, value, noAssert) {};
- /**
- * @param {string} key
- * @param {*} value
- * @param {boolean=} noAssert
- * @throws {Error}
- */
- ProtoBuf.Builder.Message.prototype.$add = function(key, value, noAssert) {};
- /**
- * @param {string} key
- * @param {*} value
- * @param {boolean=} noAssert
- * @throws {Error}
- */
- ProtoBuf.Builder.Message.prototype.set = function(key, value, noAssert) {};
- /**
- * @param {string} key
- * @param {*} value
- * @param {boolean=} noAssert
- * @throws {Error}
- */
- ProtoBuf.Builder.Message.prototype.$set = function(key, value, noAssert) {};
- /**
- * @param {string} key
- * @return {*}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.get = function(key) {};
- /**
- * @param {string} key
- * @return {*}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.$get = function(key) {};
- /**
- * @param {ByteBuffer=} buffer
- * @return {!ByteBuffer}
- * @throws {Error}
- */
- ProtoBuf.Builder.Message.prototype.encode = function(buffer) {};
- /**
- * @return {number}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.calculate = function() {};
- /**
- * @return {!ArrayBuffer}
- * @throws {Error}
- */
- ProtoBuf.Builder.Message.prototype.encodeAB = function() {};
- /**
- * @return {!ArrayBuffer}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.toArrayBuffer = function() {};
- /**
- * @return {!Buffer}
- * @throws {Error}
- */
- ProtoBuf.Builder.Message.prototype.encodeNB = function() {};
- /**
- * @return {!Buffer}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.toBuffer = function() {};
- /**
- * @return {string}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.encode64 = function() {};
- /**
- * @return {string}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.toBase64 = function() {};
- /**
- * @return {string}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.encodeHex = function() {};
- /**
- * @return {string}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.toHex = function() {};
- /**
- * @param {boolean=} includeBuffers
- * @return {Object.<string,*>}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.toRaw = function(includeBuffers) {};
- /**
- * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer
- * @param {string=} enc
- * @return {!ProtoBuf.Builder.Message}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.decode = function(buffer, enc) {};
- /**
- * @param {string} str
- * @return {!ProtoBuf.Builder.Message}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.decode64 = function(str) {};
- /**
- * @param {string} str
- * @return {!ProtoBuf.Builder.Message}
- * @throws {Error}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.decodeHex = function(str) {};
- /**
- * @return {string}
- * @nosideeffects
- */
- ProtoBuf.Builder.Message.prototype.toString = function() {};
- /**
- * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl
- * @constructor
- */
- ProtoBuf.Builder.Service = function(rpcImpl) {};
- /**
- * @type {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))}
- */
- ProtoBuf.Builder.prototype.rpcImpl;
- /**
- * @param {string} proto
- * @param {(ProtoBuf.Builder|string)=} builder
- * @param {(string|{root: string, file: string})=} filename
- * @return {!ProtoBuf.Builder}
- * @throws {Error}
- */
- ProtoBuf.loadProto = function(proto, builder, filename) {};
- /**
- * @param {string} proto
- * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder
- * @param {(string|{root: string, file: string})=} filename
- * @return {!ProtoBuf.Builder}
- * @throws {Error}
- */
- ProtoBuf.protoFromString = function(proto, builder, filename) {};
- /**
- * @param {string|{root: string, file: string}} filename
- * @param {(function(ProtoBuf.Builder)|ProtoBuf.Builder)=} callback
- * @param {ProtoBuf.Builder=} builder
- * @return {ProtoBuf.Builder|undefined}
- * @throws {Error}
- */
- ProtoBuf.loadProtoFile = function(filename, callback, builder) {};
- /**
- * @param {string|{root: string, file: string}} filename
- * @param {(function(ProtoBuf.Builder)|ProtoBuf.Builder)=} callback
- * @param {ProtoBuf.Builder=} builder
- * @return {ProtoBuf.Builder|undefined}
- * @throws {Error}
- */
- ProtoBuf.protoFromFile = function(filename, callback, builder) {};
- /**
- * @param {!*|string} json
- * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder
- * @param {(string|{root: string, file: string})=} filename
- * @return {!ProtoBuf.Builder}
- * @throws {Error}
- */
- ProtoBuf.loadJson = function(json, builder, filename) {};
- /**
- * @param {string|{root: string, file: string}} filename
- * @param {(function(ProtoBuf.Builder)|ProtoBuf.Builder)=} callback
- * @param {ProtoBuf.Builder=} builder
- * @return {ProtoBuf.Builder|undefined}
- * @throws {Error}
- */
- ProtoBuf.loadJsonFile = function(filename, callback, builder) {};
- /**
- * @param {string=} pkg
- * @return {!ProtoBuf.Builder}
- */
- ProtoBuf.newBuilder = function(pkg) {};
- ProtoBuf.Util = {};
- /**
- * @type {boolean}
- */
- ProtoBuf.Util.IS_NODE;
- /**
- * @return {XMLHttpRequest}
- */
- ProtoBuf.Util.XHR = function() {};
- /**
- * @param {string} path
- * @param {function(?string)=} callback
- * @return {?string|undefined}
- */
- ProtoBuf.Util.fetch = function(path, callback) {};
- /**
- * @param {*} obj
- * @return {boolean}
- */
- ProtoBuf.Util.isArray = function(obj) {};
|