Permalink
Browse files

Other: Updated tests to use new simplified encoder logic

  • Loading branch information...
dcodeIO committed Mar 20, 2017
1 parent da6af81 commit fe917652f88df17d4dbaae1cd74f470385342be2
@@ -288,7 +288,7 @@ function buildType(ref, type) {
type.comment ? "@classdesc " + type.comment : null,
"@exports " + fullName,
"@constructor",
"@param {Object} [" + (config.beautify ? "properties" : "p") + "] Properties to set"
"@param {Object.<string,*>=} [" + (config.beautify ? "properties" : "p") + "] Properties to set"
]);
buildFunction(type, type.name, Class.generate(type));
@@ -380,7 +380,7 @@ function buildType(ref, type) {
push("");
pushComment([
"Creates a new " + type.name + " instance using the specified properties.",
"@param {Object} [properties] Properties to set",
"@param {Object.<string,*>=} [properties] Properties to set",
"@returns {" + fullName + "} " + type.name + " instance"
]);
push(name(type.name) + ".create = function create(properties) {");
@@ -328,7 +328,7 @@ util.lazyResolve = function lazyResolve(root, lazyTypes) {
};
/**
* Default conversion options used for toJSON implementations. Converts longs, enums and bytes to strings.
* Default conversion options used for {@link Message#toJSON} implementations. Longs, enums and bytes are converted to strings by default.
* @type {ConversionOptions}
*/
util.toJSONOptions = {
@@ -22,7 +22,7 @@ $root.Test1 = (function() {
* comment.
* @exports Test1
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Test1(properties) {
if (properties)
@@ -50,7 +50,7 @@ $root.Test1 = (function() {
/**
* Creates a new Test1 instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {Test1} Test1 instance
*/
Test1.create = function create(properties) {
@@ -227,7 +227,7 @@ $root.Test2 = (function() {
* Constructs a new Test2.
* @exports Test2
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Test2(properties) {
if (properties)
@@ -237,7 +237,7 @@ $root.Test2 = (function() {
/**
* Creates a new Test2 instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {Test2} Test2 instance
*/
Test2.create = function create(properties) {
@@ -18,7 +18,7 @@ $root.Message = (function() {
* Constructs a new Message.
* @exports Message
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Message(properties) {
if (properties)
@@ -88,7 +88,7 @@ $root.Message = (function() {
/**
* Creates a new Message instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {Message} Message instance
*/
Message.create = function create(properties) {
@@ -27,7 +27,7 @@ $root.vector_tile = (function() {
* Constructs a new Tile.
* @exports vector_tile.Tile
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Tile(properties) {
if (properties)
@@ -48,7 +48,7 @@ $root.vector_tile = (function() {
/**
* Creates a new Tile instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {vector_tile.Tile} Tile instance
*/
Tile.create = function create(properties) {
@@ -234,7 +234,7 @@ $root.vector_tile = (function() {
* Constructs a new Value.
* @exports vector_tile.Tile.Value
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Value(properties) {
if (properties)
@@ -286,7 +286,7 @@ $root.vector_tile = (function() {
/**
* Creates a new Value instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {vector_tile.Tile.Value} Value instance
*/
Value.create = function create(properties) {
@@ -557,7 +557,7 @@ $root.vector_tile = (function() {
* Constructs a new Feature.
* @exports vector_tile.Tile.Feature
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Feature(properties) {
if (properties)
@@ -596,7 +596,7 @@ $root.vector_tile = (function() {
/**
* Creates a new Feature instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {vector_tile.Tile.Feature} Feature instance
*/
Feature.create = function create(properties) {
@@ -871,7 +871,7 @@ $root.vector_tile = (function() {
* Constructs a new Layer.
* @exports vector_tile.Tile.Layer
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Layer(properties) {
if (properties)
@@ -923,7 +923,7 @@ $root.vector_tile = (function() {
/**
* Creates a new Layer instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {vector_tile.Tile.Layer} Layer instance
*/
Layer.create = function create(properties) {
@@ -18,7 +18,7 @@ $root.Package = (function() {
* Constructs a new Package.
* @exports Package
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Package(properties) {
if (properties)
@@ -141,7 +141,7 @@ $root.Package = (function() {
/**
* Creates a new Package instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {Package} Package instance
*/
Package.create = function create(properties) {
@@ -644,7 +644,7 @@ $root.Package = (function() {
* Constructs a new Repository.
* @exports Package.Repository
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function Repository(properties) {
if (properties)
@@ -666,7 +666,7 @@ $root.Package = (function() {
/**
* Creates a new Repository instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {Package.Repository} Repository instance
*/
Repository.create = function create(properties) {
@@ -10,9 +10,9 @@ export class MyService extends $protobuf.rpc.Service {
type MyService_myMethod_Callback = (error: Error, response?: MyResponse) => void;
export class MyRequest {
constructor(properties?: Object);
constructor(properties?: { [k: string]: any });
public path?: string;
public static create(properties?: Object): MyRequest;
public static create(properties?: { [k: string]: any }): MyRequest;
public static encode(message: (MyRequest|Object), writer?: $protobuf.Writer): $protobuf.Writer;
public static encodeDelimited(message: (MyRequest|Object), writer?: $protobuf.Writer): $protobuf.Writer;
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MyRequest;
@@ -26,9 +26,9 @@ export class MyRequest {
}
export class MyResponse {
constructor(properties?: Object);
constructor(properties?: { [k: string]: any });
public status?: number;
public static create(properties?: Object): MyResponse;
public static create(properties?: { [k: string]: any }): MyResponse;
public static encode(message: (MyResponse|Object), writer?: $protobuf.Writer): $protobuf.Writer;
public static encodeDelimited(message: (MyResponse|Object), writer?: $protobuf.Writer): $protobuf.Writer;
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MyResponse;
@@ -76,7 +76,7 @@ $root.MyRequest = (function() {
* Constructs a new MyRequest.
* @exports MyRequest
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function MyRequest(properties) {
if (properties)
@@ -92,7 +92,7 @@ $root.MyRequest = (function() {
/**
* Creates a new MyRequest instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {MyRequest} MyRequest instance
*/
MyRequest.create = function create(properties) {
@@ -242,7 +242,7 @@ $root.MyResponse = (function() {
* Constructs a new MyResponse.
* @exports MyResponse
* @constructor
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
*/
function MyResponse(properties) {
if (properties)
@@ -258,7 +258,7 @@ $root.MyResponse = (function() {
/**
* Creates a new MyResponse instance using the specified properties.
* @param {Object} [properties] Properties to set
* @param {Object.<string,*>=} [properties] Properties to set
* @returns {MyResponse} MyResponse instance
*/
MyResponse.create = function create(properties) {
Oops, something went wrong.

0 comments on commit fe91765

Please sign in to comment.