From bed514290c105c3b606f760f2abba80510721c77 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Tue, 4 Apr 2017 10:23:52 +0200 Subject: [PATCH] CLI: With null/undefined eliminated by constructors and .create, document message fields as non-optional where applicable (ideally used with TS & strictNullChecks), see #743 --- cli/targets/static.js | 13 +- tests/data/comments.js | 6 +- tests/data/convert.js | 18 +- tests/data/mapbox/vector_tile.js | 32 +-- tests/data/package.js | 40 ++-- tests/data/rpc-es6.js | 4 +- tests/data/rpc.d.ts | 4 +- tests/data/rpc.js | 4 +- tests/data/test.d.ts | 374 +++++++++++++++---------------- tests/data/test.js | 374 +++++++++++++++---------------- 10 files changed, 437 insertions(+), 432 deletions(-) diff --git a/cli/targets/static.js b/cli/targets/static.js index 2316b7a4e..d3b7588f6 100644 --- a/cli/targets/static.js +++ b/cli/targets/static.js @@ -333,9 +333,11 @@ function toJsType(field) { type = "*"; // should not happen break; } - return field.repeated ? "Array.<" + type + ">" - : field.map ? "Object." - : type; + if (field.map) + return "Object."; + if (field.repeated) + return "Array.<" + type + ">"; + return type; } function buildType(ref, type) { @@ -374,9 +376,12 @@ function buildType(ref, type) { var prop = util.safeProp(field.name); if (config.comments) { push(""); + var jsType = toJsType(field); + if (field.optional && !field.map && !field.repeated && field.resolvedType instanceof Type) + jsType = "(" + jsType + "|null)"; pushComment([ field.comment || type.name + " " + field.name + ".", - "@type {" + toJsType(field) + (field.optional ? "|undefined" : "") + "}" + "@type {" + jsType + "}" ]); } else if (firstField) { push(""); diff --git a/tests/data/comments.js b/tests/data/comments.js index 6a1ab56f1..e267c3ce2 100644 --- a/tests/data/comments.js +++ b/tests/data/comments.js @@ -39,19 +39,19 @@ $root.Test1 = (function() { /** * Field with a comment. - * @type {string|undefined} + * @type {string} */ Test1.prototype.field1 = ""; /** * Test1 field2. - * @type {number|undefined} + * @type {number} */ Test1.prototype.field2 = 0; /** * Field with a comment and a link - * @type {boolean|undefined} + * @type {boolean} */ Test1.prototype.field3 = false; diff --git a/tests/data/convert.js b/tests/data/convert.js index d5202d35e..7b02cc506 100644 --- a/tests/data/convert.js +++ b/tests/data/convert.js @@ -46,55 +46,55 @@ $root.Message = (function() { /** * Message stringVal. - * @type {string|undefined} + * @type {string} */ Message.prototype.stringVal = ""; /** * Message stringRepeated. - * @type {Array.|undefined} + * @type {Array.} */ Message.prototype.stringRepeated = $util.emptyArray; /** * Message uint64Val. - * @type {number|Long|undefined} + * @type {number|Long} */ Message.prototype.uint64Val = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Message uint64Repeated. - * @type {Array.|undefined} + * @type {Array.} */ Message.prototype.uint64Repeated = $util.emptyArray; /** * Message bytesVal. - * @type {Uint8Array|undefined} + * @type {Uint8Array} */ Message.prototype.bytesVal = $util.newBuffer([]); /** * Message bytesRepeated. - * @type {Array.|undefined} + * @type {Array.} */ Message.prototype.bytesRepeated = $util.emptyArray; /** * Message enumVal. - * @type {Message.SomeEnum|undefined} + * @type {Message.SomeEnum} */ Message.prototype.enumVal = 1; /** * Message enumRepeated. - * @type {Array.|undefined} + * @type {Array.} */ Message.prototype.enumRepeated = $util.emptyArray; /** * Message int64Map. - * @type {Object.|undefined} + * @type {Object.} */ Message.prototype.int64Map = $util.emptyObject; diff --git a/tests/data/mapbox/vector_tile.js b/tests/data/mapbox/vector_tile.js index 1fd603292..2514ce572 100644 --- a/tests/data/mapbox/vector_tile.js +++ b/tests/data/mapbox/vector_tile.js @@ -43,7 +43,7 @@ $root.vector_tile = (function() { /** * Tile layers. - * @type {Array.|undefined} + * @type {Array.} */ Tile.prototype.layers = $util.emptyArray; @@ -259,43 +259,43 @@ $root.vector_tile = (function() { /** * Value stringValue. - * @type {string|undefined} + * @type {string} */ Value.prototype.stringValue = ""; /** * Value floatValue. - * @type {number|undefined} + * @type {number} */ Value.prototype.floatValue = 0; /** * Value doubleValue. - * @type {number|undefined} + * @type {number} */ Value.prototype.doubleValue = 0; /** * Value intValue. - * @type {number|Long|undefined} + * @type {number|Long} */ Value.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Value uintValue. - * @type {number|Long|undefined} + * @type {number|Long} */ Value.prototype.uintValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Value sintValue. - * @type {number|Long|undefined} + * @type {number|Long} */ Value.prototype.sintValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Value boolValue. - * @type {boolean|undefined} + * @type {boolean} */ Value.prototype.boolValue = false; @@ -595,25 +595,25 @@ $root.vector_tile = (function() { /** * Feature id. - * @type {number|Long|undefined} + * @type {number|Long} */ Feature.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Feature tags. - * @type {Array.|undefined} + * @type {Array.} */ Feature.prototype.tags = $util.emptyArray; /** * Feature type. - * @type {vector_tile.Tile.GeomType|undefined} + * @type {vector_tile.Tile.GeomType} */ Feature.prototype.type = 0; /** * Feature geometry. - * @type {Array.|undefined} + * @type {Array.} */ Feature.prototype.geometry = $util.emptyArray; @@ -932,25 +932,25 @@ $root.vector_tile = (function() { /** * Layer features. - * @type {Array.|undefined} + * @type {Array.} */ Layer.prototype.features = $util.emptyArray; /** * Layer keys. - * @type {Array.|undefined} + * @type {Array.} */ Layer.prototype.keys = $util.emptyArray; /** * Layer values. - * @type {Array.|undefined} + * @type {Array.} */ Layer.prototype.values = $util.emptyArray; /** * Layer extent. - * @type {number|undefined} + * @type {number} */ Layer.prototype.extent = 4096; diff --git a/tests/data/package.js b/tests/data/package.js index 91a65371b..356a88ea7 100644 --- a/tests/data/package.js +++ b/tests/data/package.js @@ -57,109 +57,109 @@ $root.Package = (function() { /** * Package name. - * @type {string|undefined} + * @type {string} */ Package.prototype.name = ""; /** * Package version. - * @type {string|undefined} + * @type {string} */ Package.prototype.version = ""; /** * Package versionScheme. - * @type {string|undefined} + * @type {string} */ Package.prototype.versionScheme = ""; /** * Package description. - * @type {string|undefined} + * @type {string} */ Package.prototype.description = ""; /** * Package author. - * @type {string|undefined} + * @type {string} */ Package.prototype.author = ""; /** * Package license. - * @type {string|undefined} + * @type {string} */ Package.prototype.license = ""; /** * Package repository. - * @type {Package.Repository$Properties|undefined} + * @type {(Package.Repository$Properties|null)} */ Package.prototype.repository = null; /** * Package bugs. - * @type {string|undefined} + * @type {string} */ Package.prototype.bugs = ""; /** * Package homepage. - * @type {string|undefined} + * @type {string} */ Package.prototype.homepage = ""; /** * Package keywords. - * @type {Array.|undefined} + * @type {Array.} */ Package.prototype.keywords = $util.emptyArray; /** * Package main. - * @type {string|undefined} + * @type {string} */ Package.prototype.main = ""; /** * Package bin. - * @type {Object.|undefined} + * @type {Object.} */ Package.prototype.bin = $util.emptyObject; /** * Package scripts. - * @type {Object.|undefined} + * @type {Object.} */ Package.prototype.scripts = $util.emptyObject; /** * Package dependencies. - * @type {Object.|undefined} + * @type {Object.} */ Package.prototype.dependencies = $util.emptyObject; /** * Package optionalDependencies. - * @type {Object.|undefined} + * @type {Object.} */ Package.prototype.optionalDependencies = $util.emptyObject; /** * Package devDependencies. - * @type {Object.|undefined} + * @type {Object.} */ Package.prototype.devDependencies = $util.emptyObject; /** * Package types. - * @type {string|undefined} + * @type {string} */ Package.prototype.types = ""; /** * Package cliDependencies. - * @type {Array.|undefined} + * @type {Array.} */ Package.prototype.cliDependencies = $util.emptyArray; @@ -688,13 +688,13 @@ $root.Package = (function() { /** * Repository type. - * @type {string|undefined} + * @type {string} */ Repository.prototype.type = ""; /** * Repository url. - * @type {string|undefined} + * @type {string} */ Repository.prototype.url = ""; diff --git a/tests/data/rpc-es6.js b/tests/data/rpc-es6.js index b258ac1a8..1ba8d4af0 100644 --- a/tests/data/rpc-es6.js +++ b/tests/data/rpc-es6.js @@ -89,7 +89,7 @@ export const MyRequest = $root.MyRequest = (() => { /** * MyRequest path. - * @type {string|undefined} + * @type {string} */ MyRequest.prototype.path = ""; @@ -263,7 +263,7 @@ export const MyResponse = $root.MyResponse = (() => { /** * MyResponse status. - * @type {number|undefined} + * @type {number} */ MyResponse.prototype.status = 0; diff --git a/tests/data/rpc.d.ts b/tests/data/rpc.d.ts index e4477b9e0..dddf04b6c 100644 --- a/tests/data/rpc.d.ts +++ b/tests/data/rpc.d.ts @@ -15,7 +15,7 @@ type MyRequest$Properties = { export class MyRequest { constructor(properties?: MyRequest$Properties); - public path?: string; + public path: string; public static create(properties?: MyRequest$Properties): MyRequest; public static encode(message: MyRequest$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: MyRequest$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -35,7 +35,7 @@ type MyResponse$Properties = { export class MyResponse { constructor(properties?: MyResponse$Properties); - public status?: number; + public status: number; public static create(properties?: MyResponse$Properties): MyResponse; public static encode(message: MyResponse$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: MyResponse$Properties, writer?: $protobuf.Writer): $protobuf.Writer; diff --git a/tests/data/rpc.js b/tests/data/rpc.js index 8bda57ed5..1aea61d49 100644 --- a/tests/data/rpc.js +++ b/tests/data/rpc.js @@ -91,7 +91,7 @@ $root.MyRequest = (function() { /** * MyRequest path. - * @type {string|undefined} + * @type {string} */ MyRequest.prototype.path = ""; @@ -265,7 +265,7 @@ $root.MyResponse = (function() { /** * MyResponse status. - * @type {number|undefined} + * @type {number} */ MyResponse.prototype.status = 0; diff --git a/tests/data/test.d.ts b/tests/data/test.d.ts index 05cd1a589..6dee31683 100644 --- a/tests/data/test.d.ts +++ b/tests/data/test.d.ts @@ -32,7 +32,7 @@ export namespace jspb { class EnumContainer { constructor(properties?: jspb.test.EnumContainer$Properties); - public outerEnum?: jspb.test.OuterEnum; + public outerEnum: jspb.test.OuterEnum; public static create(properties?: jspb.test.EnumContainer$Properties): jspb.test.EnumContainer; public static encode(message: jspb.test.EnumContainer$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.EnumContainer$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -55,8 +55,8 @@ export namespace jspb { class Simple1 { constructor(properties?: jspb.test.Simple1$Properties); public aString: string; - public aRepeatedString?: string[]; - public aBoolean?: boolean; + public aRepeatedString: string[]; + public aBoolean: boolean; public static create(properties?: jspb.test.Simple1$Properties): jspb.test.Simple1; public static encode(message: jspb.test.Simple1$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.Simple1$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -78,7 +78,7 @@ export namespace jspb { class Simple2 { constructor(properties?: jspb.test.Simple2$Properties); public aString: string; - public aRepeatedString?: string[]; + public aRepeatedString: string[]; public static create(properties?: jspb.test.Simple2$Properties): jspb.test.Simple2; public static encode(message: jspb.test.Simple2$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.Simple2$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -128,11 +128,11 @@ export namespace jspb { class OptionalFields { constructor(properties?: jspb.test.OptionalFields$Properties); - public aString?: string; + public aString: string; public aBool: boolean; - public aNestedMessage?: jspb.test.OptionalFields.Nested$Properties; - public aRepeatedMessage?: jspb.test.OptionalFields.Nested$Properties[]; - public aRepeatedString?: string[]; + public aNestedMessage: (jspb.test.OptionalFields.Nested$Properties|null); + public aRepeatedMessage: jspb.test.OptionalFields.Nested$Properties[]; + public aRepeatedString: string[]; public static create(properties?: jspb.test.OptionalFields$Properties): jspb.test.OptionalFields; public static encode(message: jspb.test.OptionalFields$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.OptionalFields$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -154,7 +154,7 @@ export namespace jspb { class Nested { constructor(properties?: jspb.test.OptionalFields.Nested$Properties); - public anInt?: number; + public anInt: number; public static create(properties?: jspb.test.OptionalFields.Nested$Properties): jspb.test.OptionalFields.Nested; public static encode(message: jspb.test.OptionalFields.Nested$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.OptionalFields.Nested$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -183,15 +183,15 @@ export namespace jspb { class HasExtensions { constructor(properties?: jspb.test.HasExtensions$Properties); - public str1?: string; - public str2?: string; - public str3?: string; - public [".jspb.test.IsExtension.extField"]?: jspb.test.IsExtension$Properties; - public [".jspb.test.IndirectExtension.simple"]?: jspb.test.Simple1$Properties; - public [".jspb.test.IndirectExtension.str"]?: string; - public [".jspb.test.IndirectExtension.repeatedStr"]?: string[]; - public [".jspb.test.IndirectExtension.repeatedSimple"]?: jspb.test.Simple1$Properties[]; - public [".jspb.test.simple1"]?: jspb.test.Simple1$Properties; + public str1: string; + public str2: string; + public str3: string; + public [".jspb.test.IsExtension.extField"]: (jspb.test.IsExtension$Properties|null); + public [".jspb.test.IndirectExtension.simple"]: (jspb.test.Simple1$Properties|null); + public [".jspb.test.IndirectExtension.str"]: string; + public [".jspb.test.IndirectExtension.repeatedStr"]: string[]; + public [".jspb.test.IndirectExtension.repeatedSimple"]: jspb.test.Simple1$Properties[]; + public [".jspb.test.simple1"]: (jspb.test.Simple1$Properties|null); public static create(properties?: jspb.test.HasExtensions$Properties): jspb.test.HasExtensions; public static encode(message: jspb.test.HasExtensions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.HasExtensions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -217,9 +217,9 @@ export namespace jspb { constructor(properties?: jspb.test.Complex$Properties); public aString: string; public anOutOfOrderBool: boolean; - public aNestedMessage?: jspb.test.Complex.Nested$Properties; - public aRepeatedMessage?: jspb.test.Complex.Nested$Properties[]; - public aRepeatedString?: string[]; + public aNestedMessage: (jspb.test.Complex.Nested$Properties|null); + public aRepeatedMessage: jspb.test.Complex.Nested$Properties[]; + public aRepeatedString: string[]; public static create(properties?: jspb.test.Complex$Properties): jspb.test.Complex; public static encode(message: jspb.test.Complex$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.Complex$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -281,7 +281,7 @@ export namespace jspb { class Complex { constructor(properties?: jspb.test.OuterMessage.Complex$Properties); - public innerComplexField?: number; + public innerComplexField: number; public static create(properties?: jspb.test.OuterMessage.Complex$Properties): jspb.test.OuterMessage.Complex; public static encode(message: jspb.test.OuterMessage.Complex$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.OuterMessage.Complex$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -302,7 +302,7 @@ export namespace jspb { class IsExtension { constructor(properties?: jspb.test.IsExtension$Properties); - public ext1?: string; + public ext1: string; public static create(properties?: jspb.test.IsExtension$Properties): jspb.test.IsExtension; public static encode(message: jspb.test.IsExtension$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.IsExtension$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -344,12 +344,12 @@ export namespace jspb { class DefaultValues { constructor(properties?: jspb.test.DefaultValues$Properties); - public stringField?: string; - public boolField?: boolean; - public intField?: (number|Long); - public enumField?: jspb.test.DefaultValues.Enum; - public emptyField?: string; - public bytesField?: Uint8Array; + public stringField: string; + public boolField: boolean; + public intField: (number|Long); + public enumField: jspb.test.DefaultValues.Enum; + public emptyField: string; + public bytesField: Uint8Array; public static create(properties?: jspb.test.DefaultValues$Properties): jspb.test.DefaultValues; public static encode(message: jspb.test.DefaultValues$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.DefaultValues$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -384,14 +384,14 @@ export namespace jspb { class FloatingPointFields { constructor(properties?: jspb.test.FloatingPointFields$Properties); - public optionalFloatField?: number; + public optionalFloatField: number; public requiredFloatField: number; - public repeatedFloatField?: number[]; - public defaultFloatField?: number; - public optionalDoubleField?: number; + public repeatedFloatField: number[]; + public defaultFloatField: number; + public optionalDoubleField: number; public requiredDoubleField: number; - public repeatedDoubleField?: number[]; - public defaultDoubleField?: number; + public repeatedDoubleField: number[]; + public defaultDoubleField: number; public static create(properties?: jspb.test.FloatingPointFields$Properties): jspb.test.FloatingPointFields; public static encode(message: jspb.test.FloatingPointFields$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.FloatingPointFields$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -416,12 +416,12 @@ export namespace jspb { class TestClone { constructor(properties?: jspb.test.TestClone$Properties); - public str?: string; - public simple1?: jspb.test.Simple1$Properties; - public simple2?: jspb.test.Simple1$Properties[]; - public bytesField?: Uint8Array; - public unused?: string; - public [".jspb.test.CloneExtension.extField"]?: jspb.test.CloneExtension$Properties; + public str: string; + public simple1: (jspb.test.Simple1$Properties|null); + public simple2: jspb.test.Simple1$Properties[]; + public bytesField: Uint8Array; + public unused: string; + public [".jspb.test.CloneExtension.extField"]: (jspb.test.CloneExtension$Properties|null); public static create(properties?: jspb.test.TestClone$Properties): jspb.test.TestClone; public static encode(message: jspb.test.TestClone$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.TestClone$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -441,7 +441,7 @@ export namespace jspb { class CloneExtension { constructor(properties?: jspb.test.CloneExtension$Properties); - public ext?: string; + public ext: string; public static create(properties?: jspb.test.CloneExtension$Properties): jspb.test.CloneExtension; public static encode(message: jspb.test.CloneExtension$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.CloneExtension$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -466,12 +466,12 @@ export namespace jspb { class TestGroup { constructor(properties?: jspb.test.TestGroup$Properties); - public repeatedGroup?: jspb.test.TestGroup.RepeatedGroup$Properties[]; + public repeatedGroup: jspb.test.TestGroup.RepeatedGroup$Properties[]; public requiredGroup: jspb.test.TestGroup.RequiredGroup$Properties; - public optionalGroup?: jspb.test.TestGroup.OptionalGroup$Properties; - public id?: string; + public optionalGroup: (jspb.test.TestGroup.OptionalGroup$Properties|null); + public id: string; public requiredSimple: jspb.test.Simple2$Properties; - public optionalSimple?: jspb.test.Simple2$Properties; + public optionalSimple: (jspb.test.Simple2$Properties|null); public static create(properties?: jspb.test.TestGroup$Properties): jspb.test.TestGroup; public static encode(message: jspb.test.TestGroup$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.TestGroup$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -495,7 +495,7 @@ export namespace jspb { class RepeatedGroup { constructor(properties?: jspb.test.TestGroup.RepeatedGroup$Properties); public id: string; - public someBool?: boolean[]; + public someBool: boolean[]; public static create(properties?: jspb.test.TestGroup.RepeatedGroup$Properties): jspb.test.TestGroup.RepeatedGroup; public static encode(message: jspb.test.TestGroup.RepeatedGroup$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.TestGroup.RepeatedGroup$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -556,7 +556,7 @@ export namespace jspb { class TestGroup1 { constructor(properties?: jspb.test.TestGroup1$Properties); - public group?: jspb.test.TestGroup.RepeatedGroup$Properties; + public group: (jspb.test.TestGroup.RepeatedGroup$Properties|null); public static create(properties?: jspb.test.TestGroup1$Properties): jspb.test.TestGroup1; public static encode(message: jspb.test.TestGroup1$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.TestGroup1$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -577,8 +577,8 @@ export namespace jspb { class TestReservedNames { constructor(properties?: jspb.test.TestReservedNames$Properties); - public extension?: number; - public [".jspb.test.TestReservedNamesExtension.foo"]?: number; + public extension: number; + public [".jspb.test.TestReservedNamesExtension.foo"]: number; public static create(properties?: jspb.test.TestReservedNames$Properties): jspb.test.TestReservedNames; public static encode(message: jspb.test.TestReservedNames$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.TestReservedNames$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -624,16 +624,16 @@ export namespace jspb { class TestMessageWithOneof { constructor(properties?: jspb.test.TestMessageWithOneof$Properties); - public pone?: string; - public pthree?: string; - public rone?: jspb.test.TestMessageWithOneof$Properties; - public rtwo?: string; - public normalField?: boolean; - public repeatedField?: string[]; - public aone?: number; - public atwo?: number; - public bone?: number; - public btwo?: number; + public pone: string; + public pthree: string; + public rone: (jspb.test.TestMessageWithOneof$Properties|null); + public rtwo: string; + public normalField: boolean; + public repeatedField: string[]; + public aone: number; + public atwo: number; + public bone: number; + public btwo: number; public partialOneof?: string; public recursiveOneof?: string; public defaultOneofA?: string; @@ -658,8 +658,8 @@ export namespace jspb { class TestEndsWithBytes { constructor(properties?: jspb.test.TestEndsWithBytes$Properties); - public value?: number; - public data?: Uint8Array; + public value: number; + public data: Uint8Array; public static create(properties?: jspb.test.TestEndsWithBytes$Properties): jspb.test.TestEndsWithBytes; public static encode(message: jspb.test.TestEndsWithBytes$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.TestEndsWithBytes$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -690,18 +690,18 @@ export namespace jspb { class TestMapFieldsNoBinary { constructor(properties?: jspb.test.TestMapFieldsNoBinary$Properties); - public mapStringString?: { [k: string]: string }; - public mapStringInt32?: { [k: string]: number }; - public mapStringInt64?: { [k: string]: (number|Long) }; - public mapStringBool?: { [k: string]: boolean }; - public mapStringDouble?: { [k: string]: number }; - public mapStringEnum?: { [k: string]: jspb.test.MapValueEnumNoBinary }; - public mapStringMsg?: { [k: string]: jspb.test.MapValueMessageNoBinary$Properties }; - public mapInt32String?: { [k: string]: string }; - public mapInt64String?: { [k: string]: string }; - public mapBoolString?: { [k: string]: string }; - public testMapFields?: jspb.test.TestMapFieldsNoBinary$Properties; - public mapStringTestmapfields?: { [k: string]: jspb.test.TestMapFieldsNoBinary$Properties }; + public mapStringString: { [k: string]: string }; + public mapStringInt32: { [k: string]: number }; + public mapStringInt64: { [k: string]: (number|Long) }; + public mapStringBool: { [k: string]: boolean }; + public mapStringDouble: { [k: string]: number }; + public mapStringEnum: { [k: string]: jspb.test.MapValueEnumNoBinary }; + public mapStringMsg: { [k: string]: jspb.test.MapValueMessageNoBinary$Properties }; + public mapInt32String: { [k: string]: string }; + public mapInt64String: { [k: string]: string }; + public mapBoolString: { [k: string]: string }; + public testMapFields: (jspb.test.TestMapFieldsNoBinary$Properties|null); + public mapStringTestmapfields: { [k: string]: jspb.test.TestMapFieldsNoBinary$Properties }; public static create(properties?: jspb.test.TestMapFieldsNoBinary$Properties): jspb.test.TestMapFieldsNoBinary; public static encode(message: jspb.test.TestMapFieldsNoBinary$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.TestMapFieldsNoBinary$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -727,7 +727,7 @@ export namespace jspb { class MapValueMessageNoBinary { constructor(properties?: jspb.test.MapValueMessageNoBinary$Properties); - public foo?: number; + public foo: number; public static create(properties?: jspb.test.MapValueMessageNoBinary$Properties): jspb.test.MapValueMessageNoBinary; public static encode(message: jspb.test.MapValueMessageNoBinary$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.MapValueMessageNoBinary$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -785,7 +785,7 @@ export namespace jspb { class Message { constructor(properties?: jspb.test.Deeply.Nested.Message$Properties); - public count?: number; + public count: number; public static create(properties?: jspb.test.Deeply.Nested.Message$Properties): jspb.test.Deeply.Nested.Message; public static encode(message: jspb.test.Deeply.Nested.Message$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: jspb.test.Deeply.Nested.Message$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -813,7 +813,7 @@ export namespace google { class FileDescriptorSet { constructor(properties?: google.protobuf.FileDescriptorSet$Properties); - public file?: google.protobuf.FileDescriptorProto$Properties[]; + public file: google.protobuf.FileDescriptorProto$Properties[]; public static create(properties?: google.protobuf.FileDescriptorSet$Properties): google.protobuf.FileDescriptorSet; public static encode(message: google.protobuf.FileDescriptorSet$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.FileDescriptorSet$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -844,18 +844,18 @@ export namespace google { class FileDescriptorProto { constructor(properties?: google.protobuf.FileDescriptorProto$Properties); - public name?: string; - public ["package"]?: string; - public dependency?: string[]; - public publicDependency?: number[]; - public weakDependency?: number[]; - public messageType?: google.protobuf.DescriptorProto$Properties[]; - public enumType?: google.protobuf.EnumDescriptorProto$Properties[]; - public service?: google.protobuf.ServiceDescriptorProto$Properties[]; - public extension?: google.protobuf.FieldDescriptorProto$Properties[]; - public options?: google.protobuf.FileOptions$Properties; - public sourceCodeInfo?: google.protobuf.SourceCodeInfo$Properties; - public syntax?: string; + public name: string; + public ["package"]: string; + public dependency: string[]; + public publicDependency: number[]; + public weakDependency: number[]; + public messageType: google.protobuf.DescriptorProto$Properties[]; + public enumType: google.protobuf.EnumDescriptorProto$Properties[]; + public service: google.protobuf.ServiceDescriptorProto$Properties[]; + public extension: google.protobuf.FieldDescriptorProto$Properties[]; + public options: (google.protobuf.FileOptions$Properties|null); + public sourceCodeInfo: (google.protobuf.SourceCodeInfo$Properties|null); + public syntax: string; public static create(properties?: google.protobuf.FileDescriptorProto$Properties): google.protobuf.FileDescriptorProto; public static encode(message: google.protobuf.FileDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.FileDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -884,16 +884,16 @@ export namespace google { class DescriptorProto { constructor(properties?: google.protobuf.DescriptorProto$Properties); - public name?: string; - public field?: google.protobuf.FieldDescriptorProto$Properties[]; - public extension?: google.protobuf.FieldDescriptorProto$Properties[]; - public nestedType?: google.protobuf.DescriptorProto$Properties[]; - public enumType?: google.protobuf.EnumDescriptorProto$Properties[]; - public extensionRange?: google.protobuf.DescriptorProto.ExtensionRange$Properties[]; - public oneofDecl?: google.protobuf.OneofDescriptorProto$Properties[]; - public options?: google.protobuf.MessageOptions$Properties; - public reservedRange?: google.protobuf.DescriptorProto.ReservedRange$Properties[]; - public reservedName?: string[]; + public name: string; + public field: google.protobuf.FieldDescriptorProto$Properties[]; + public extension: google.protobuf.FieldDescriptorProto$Properties[]; + public nestedType: google.protobuf.DescriptorProto$Properties[]; + public enumType: google.protobuf.EnumDescriptorProto$Properties[]; + public extensionRange: google.protobuf.DescriptorProto.ExtensionRange$Properties[]; + public oneofDecl: google.protobuf.OneofDescriptorProto$Properties[]; + public options: (google.protobuf.MessageOptions$Properties|null); + public reservedRange: google.protobuf.DescriptorProto.ReservedRange$Properties[]; + public reservedName: string[]; public static create(properties?: google.protobuf.DescriptorProto$Properties): google.protobuf.DescriptorProto; public static encode(message: google.protobuf.DescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.DescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -916,8 +916,8 @@ export namespace google { class ExtensionRange { constructor(properties?: google.protobuf.DescriptorProto.ExtensionRange$Properties); - public start?: number; - public end?: number; + public start: number; + public end: number; public static create(properties?: google.protobuf.DescriptorProto.ExtensionRange$Properties): google.protobuf.DescriptorProto.ExtensionRange; public static encode(message: google.protobuf.DescriptorProto.ExtensionRange$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.DescriptorProto.ExtensionRange$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -938,8 +938,8 @@ export namespace google { class ReservedRange { constructor(properties?: google.protobuf.DescriptorProto.ReservedRange$Properties); - public start?: number; - public end?: number; + public start: number; + public end: number; public static create(properties?: google.protobuf.DescriptorProto.ReservedRange$Properties): google.protobuf.DescriptorProto.ReservedRange; public static encode(message: google.protobuf.DescriptorProto.ReservedRange$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.DescriptorProto.ReservedRange$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -969,16 +969,16 @@ export namespace google { class FieldDescriptorProto { constructor(properties?: google.protobuf.FieldDescriptorProto$Properties); - public name?: string; - public number?: number; - public label?: google.protobuf.FieldDescriptorProto.Label; - public type?: google.protobuf.FieldDescriptorProto.Type; - public typeName?: string; - public extendee?: string; - public defaultValue?: string; - public oneofIndex?: number; - public jsonName?: string; - public options?: google.protobuf.FieldOptions$Properties; + public name: string; + public number: number; + public label: google.protobuf.FieldDescriptorProto.Label; + public type: google.protobuf.FieldDescriptorProto.Type; + public typeName: string; + public extendee: string; + public defaultValue: string; + public oneofIndex: number; + public jsonName: string; + public options: (google.protobuf.FieldOptions$Properties|null); public static create(properties?: google.protobuf.FieldDescriptorProto$Properties): google.protobuf.FieldDescriptorProto; public static encode(message: google.protobuf.FieldDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.FieldDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1029,8 +1029,8 @@ export namespace google { class OneofDescriptorProto { constructor(properties?: google.protobuf.OneofDescriptorProto$Properties); - public name?: string; - public options?: google.protobuf.OneofOptions$Properties; + public name: string; + public options: (google.protobuf.OneofOptions$Properties|null); public static create(properties?: google.protobuf.OneofDescriptorProto$Properties): google.protobuf.OneofDescriptorProto; public static encode(message: google.protobuf.OneofDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.OneofDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1052,9 +1052,9 @@ export namespace google { class EnumDescriptorProto { constructor(properties?: google.protobuf.EnumDescriptorProto$Properties); - public name?: string; - public value?: google.protobuf.EnumValueDescriptorProto$Properties[]; - public options?: google.protobuf.EnumOptions$Properties; + public name: string; + public value: google.protobuf.EnumValueDescriptorProto$Properties[]; + public options: (google.protobuf.EnumOptions$Properties|null); public static create(properties?: google.protobuf.EnumDescriptorProto$Properties): google.protobuf.EnumDescriptorProto; public static encode(message: google.protobuf.EnumDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.EnumDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1076,9 +1076,9 @@ export namespace google { class EnumValueDescriptorProto { constructor(properties?: google.protobuf.EnumValueDescriptorProto$Properties); - public name?: string; - public number?: number; - public options?: google.protobuf.EnumValueOptions$Properties; + public name: string; + public number: number; + public options: (google.protobuf.EnumValueOptions$Properties|null); public static create(properties?: google.protobuf.EnumValueDescriptorProto$Properties): google.protobuf.EnumValueDescriptorProto; public static encode(message: google.protobuf.EnumValueDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.EnumValueDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1100,9 +1100,9 @@ export namespace google { class ServiceDescriptorProto { constructor(properties?: google.protobuf.ServiceDescriptorProto$Properties); - public name?: string; - public method?: google.protobuf.MethodDescriptorProto$Properties[]; - public options?: google.protobuf.ServiceOptions$Properties; + public name: string; + public method: google.protobuf.MethodDescriptorProto$Properties[]; + public options: (google.protobuf.ServiceOptions$Properties|null); public static create(properties?: google.protobuf.ServiceDescriptorProto$Properties): google.protobuf.ServiceDescriptorProto; public static encode(message: google.protobuf.ServiceDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.ServiceDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1127,12 +1127,12 @@ export namespace google { class MethodDescriptorProto { constructor(properties?: google.protobuf.MethodDescriptorProto$Properties); - public name?: string; - public inputType?: string; - public outputType?: string; - public options?: google.protobuf.MethodOptions$Properties; - public clientStreaming?: boolean; - public serverStreaming?: boolean; + public name: string; + public inputType: string; + public outputType: string; + public options: (google.protobuf.MethodOptions$Properties|null); + public clientStreaming: boolean; + public serverStreaming: boolean; public static create(properties?: google.protobuf.MethodDescriptorProto$Properties): google.protobuf.MethodDescriptorProto; public static encode(message: google.protobuf.MethodDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.MethodDescriptorProto$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1166,21 +1166,21 @@ export namespace google { class FileOptions { constructor(properties?: google.protobuf.FileOptions$Properties); - public javaPackage?: string; - public javaOuterClassname?: string; - public javaMultipleFiles?: boolean; - public javaGenerateEqualsAndHash?: boolean; - public javaStringCheckUtf8?: boolean; - public optimizeFor?: google.protobuf.FileOptions.OptimizeMode; - public goPackage?: string; - public ccGenericServices?: boolean; - public javaGenericServices?: boolean; - public pyGenericServices?: boolean; - public deprecated?: boolean; - public ccEnableArenas?: boolean; - public objcClassPrefix?: string; - public csharpNamespace?: string; - public uninterpretedOption?: google.protobuf.UninterpretedOption$Properties[]; + public javaPackage: string; + public javaOuterClassname: string; + public javaMultipleFiles: boolean; + public javaGenerateEqualsAndHash: boolean; + public javaStringCheckUtf8: boolean; + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + public goPackage: string; + public ccGenericServices: boolean; + public javaGenericServices: boolean; + public pyGenericServices: boolean; + public deprecated: boolean; + public ccEnableArenas: boolean; + public objcClassPrefix: string; + public csharpNamespace: string; + public uninterpretedOption: google.protobuf.UninterpretedOption$Properties[]; public static create(properties?: google.protobuf.FileOptions$Properties): google.protobuf.FileOptions; public static encode(message: google.protobuf.FileOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.FileOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1213,11 +1213,11 @@ export namespace google { class MessageOptions { constructor(properties?: google.protobuf.MessageOptions$Properties); - public messageSetWireFormat?: boolean; - public noStandardDescriptorAccessor?: boolean; - public deprecated?: boolean; - public mapEntry?: boolean; - public uninterpretedOption?: google.protobuf.UninterpretedOption$Properties[]; + public messageSetWireFormat: boolean; + public noStandardDescriptorAccessor: boolean; + public deprecated: boolean; + public mapEntry: boolean; + public uninterpretedOption: google.protobuf.UninterpretedOption$Properties[]; public static create(properties?: google.protobuf.MessageOptions$Properties): google.protobuf.MessageOptions; public static encode(message: google.protobuf.MessageOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.MessageOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1243,13 +1243,13 @@ export namespace google { class FieldOptions { constructor(properties?: google.protobuf.FieldOptions$Properties); - public ctype?: google.protobuf.FieldOptions.CType; - public packed?: boolean; - public jstype?: google.protobuf.FieldOptions.JSType; - public lazy?: boolean; - public deprecated?: boolean; - public weak?: boolean; - public uninterpretedOption?: google.protobuf.UninterpretedOption$Properties[]; + public ctype: google.protobuf.FieldOptions.CType; + public packed: boolean; + public jstype: google.protobuf.FieldOptions.JSType; + public lazy: boolean; + public deprecated: boolean; + public weak: boolean; + public uninterpretedOption: google.protobuf.UninterpretedOption$Properties[]; public static create(properties?: google.protobuf.FieldOptions$Properties): google.protobuf.FieldOptions; public static encode(message: google.protobuf.FieldOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.FieldOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1284,7 +1284,7 @@ export namespace google { class OneofOptions { constructor(properties?: google.protobuf.OneofOptions$Properties); - public uninterpretedOption?: google.protobuf.UninterpretedOption$Properties[]; + public uninterpretedOption: google.protobuf.UninterpretedOption$Properties[]; public static create(properties?: google.protobuf.OneofOptions$Properties): google.protobuf.OneofOptions; public static encode(message: google.protobuf.OneofOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.OneofOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1307,10 +1307,10 @@ export namespace google { class EnumOptions { constructor(properties?: google.protobuf.EnumOptions$Properties); - public allowAlias?: boolean; - public deprecated?: boolean; - public uninterpretedOption?: google.protobuf.UninterpretedOption$Properties[]; - public [".jspb.test.IsExtension.simpleOption"]?: string; + public allowAlias: boolean; + public deprecated: boolean; + public uninterpretedOption: google.protobuf.UninterpretedOption$Properties[]; + public [".jspb.test.IsExtension.simpleOption"]: string; public static create(properties?: google.protobuf.EnumOptions$Properties): google.protobuf.EnumOptions; public static encode(message: google.protobuf.EnumOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.EnumOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1331,8 +1331,8 @@ export namespace google { class EnumValueOptions { constructor(properties?: google.protobuf.EnumValueOptions$Properties); - public deprecated?: boolean; - public uninterpretedOption?: google.protobuf.UninterpretedOption$Properties[]; + public deprecated: boolean; + public uninterpretedOption: google.protobuf.UninterpretedOption$Properties[]; public static create(properties?: google.protobuf.EnumValueOptions$Properties): google.protobuf.EnumValueOptions; public static encode(message: google.protobuf.EnumValueOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.EnumValueOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1353,8 +1353,8 @@ export namespace google { class ServiceOptions { constructor(properties?: google.protobuf.ServiceOptions$Properties); - public deprecated?: boolean; - public uninterpretedOption?: google.protobuf.UninterpretedOption$Properties[]; + public deprecated: boolean; + public uninterpretedOption: google.protobuf.UninterpretedOption$Properties[]; public static create(properties?: google.protobuf.ServiceOptions$Properties): google.protobuf.ServiceOptions; public static encode(message: google.protobuf.ServiceOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.ServiceOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1376,9 +1376,9 @@ export namespace google { class MethodOptions { constructor(properties?: google.protobuf.MethodOptions$Properties); - public deprecated?: boolean; - public idempotencyLevel?: google.protobuf.MethodOptions.IdempotencyLevel; - public uninterpretedOption?: google.protobuf.UninterpretedOption$Properties[]; + public deprecated: boolean; + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + public uninterpretedOption: google.protobuf.UninterpretedOption$Properties[]; public static create(properties?: google.protobuf.MethodOptions$Properties): google.protobuf.MethodOptions; public static encode(message: google.protobuf.MethodOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.MethodOptions$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1413,13 +1413,13 @@ export namespace google { class UninterpretedOption { constructor(properties?: google.protobuf.UninterpretedOption$Properties); - public name?: google.protobuf.UninterpretedOption.NamePart$Properties[]; - public identifierValue?: string; - public positiveIntValue?: (number|Long); - public negativeIntValue?: (number|Long); - public doubleValue?: number; - public stringValue?: Uint8Array; - public aggregateValue?: string; + public name: google.protobuf.UninterpretedOption.NamePart$Properties[]; + public identifierValue: string; + public positiveIntValue: (number|Long); + public negativeIntValue: (number|Long); + public doubleValue: number; + public stringValue: Uint8Array; + public aggregateValue: string; public static create(properties?: google.protobuf.UninterpretedOption$Properties): google.protobuf.UninterpretedOption; public static encode(message: google.protobuf.UninterpretedOption$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.UninterpretedOption$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1464,7 +1464,7 @@ export namespace google { class SourceCodeInfo { constructor(properties?: google.protobuf.SourceCodeInfo$Properties); - public location?: google.protobuf.SourceCodeInfo.Location$Properties[]; + public location: google.protobuf.SourceCodeInfo.Location$Properties[]; public static create(properties?: google.protobuf.SourceCodeInfo$Properties): google.protobuf.SourceCodeInfo; public static encode(message: google.protobuf.SourceCodeInfo$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.SourceCodeInfo$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1490,11 +1490,11 @@ export namespace google { class Location { constructor(properties?: google.protobuf.SourceCodeInfo.Location$Properties); - public path?: number[]; - public span?: number[]; - public leadingComments?: string; - public trailingComments?: string; - public leadingDetachedComments?: string[]; + public path: number[]; + public span: number[]; + public leadingComments: string; + public trailingComments: string; + public leadingDetachedComments: string[]; public static create(properties?: google.protobuf.SourceCodeInfo.Location$Properties): google.protobuf.SourceCodeInfo.Location; public static encode(message: google.protobuf.SourceCodeInfo.Location$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.SourceCodeInfo.Location$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1515,7 +1515,7 @@ export namespace google { class GeneratedCodeInfo { constructor(properties?: google.protobuf.GeneratedCodeInfo$Properties); - public annotation?: google.protobuf.GeneratedCodeInfo.Annotation$Properties[]; + public annotation: google.protobuf.GeneratedCodeInfo.Annotation$Properties[]; public static create(properties?: google.protobuf.GeneratedCodeInfo$Properties): google.protobuf.GeneratedCodeInfo; public static encode(message: google.protobuf.GeneratedCodeInfo$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo$Properties, writer?: $protobuf.Writer): $protobuf.Writer; @@ -1540,10 +1540,10 @@ export namespace google { class Annotation { constructor(properties?: google.protobuf.GeneratedCodeInfo.Annotation$Properties); - public path?: number[]; - public sourceFile?: string; - public begin?: number; - public end?: number; + public path: number[]; + public sourceFile: string; + public begin: number; + public end: number; public static create(properties?: google.protobuf.GeneratedCodeInfo.Annotation$Properties): google.protobuf.GeneratedCodeInfo.Annotation; public static encode(message: google.protobuf.GeneratedCodeInfo.Annotation$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.Annotation$Properties, writer?: $protobuf.Writer): $protobuf.Writer; diff --git a/tests/data/test.js b/tests/data/test.js index e97d0d84e..3c7513cf1 100644 --- a/tests/data/test.js +++ b/tests/data/test.js @@ -215,7 +215,7 @@ $root.jspb = (function() { /** * EnumContainer outerEnum. - * @type {jspb.test.OuterEnum|undefined} + * @type {jspb.test.OuterEnum} */ EnumContainer.prototype.outerEnum = 1; @@ -411,13 +411,13 @@ $root.jspb = (function() { /** * Simple1 aRepeatedString. - * @type {Array.|undefined} + * @type {Array.} */ Simple1.prototype.aRepeatedString = $util.emptyArray; /** * Simple1 aBoolean. - * @type {boolean|undefined} + * @type {boolean} */ Simple1.prototype.aBoolean = false; @@ -642,7 +642,7 @@ $root.jspb = (function() { /** * Simple2 aRepeatedString. - * @type {Array.|undefined} + * @type {Array.} */ Simple2.prototype.aRepeatedString = $util.emptyArray; @@ -1086,7 +1086,7 @@ $root.jspb = (function() { /** * OptionalFields aString. - * @type {string|undefined} + * @type {string} */ OptionalFields.prototype.aString = ""; @@ -1098,19 +1098,19 @@ $root.jspb = (function() { /** * OptionalFields aNestedMessage. - * @type {jspb.test.OptionalFields.Nested$Properties|undefined} + * @type {(jspb.test.OptionalFields.Nested$Properties|null)} */ OptionalFields.prototype.aNestedMessage = null; /** * OptionalFields aRepeatedMessage. - * @type {Array.|undefined} + * @type {Array.} */ OptionalFields.prototype.aRepeatedMessage = $util.emptyArray; /** * OptionalFields aRepeatedString. - * @type {Array.|undefined} + * @type {Array.} */ OptionalFields.prototype.aRepeatedString = $util.emptyArray; @@ -1376,7 +1376,7 @@ $root.jspb = (function() { /** * Nested anInt. - * @type {number|undefined} + * @type {number} */ Nested.prototype.anInt = 0; @@ -1563,55 +1563,55 @@ $root.jspb = (function() { /** * HasExtensions str1. - * @type {string|undefined} + * @type {string} */ HasExtensions.prototype.str1 = ""; /** * HasExtensions str2. - * @type {string|undefined} + * @type {string} */ HasExtensions.prototype.str2 = ""; /** * HasExtensions str3. - * @type {string|undefined} + * @type {string} */ HasExtensions.prototype.str3 = ""; /** * HasExtensions .jspb.test.IsExtension.extField. - * @type {jspb.test.IsExtension$Properties|undefined} + * @type {(jspb.test.IsExtension$Properties|null)} */ HasExtensions.prototype[".jspb.test.IsExtension.extField"] = null; /** * HasExtensions .jspb.test.IndirectExtension.simple. - * @type {jspb.test.Simple1$Properties|undefined} + * @type {(jspb.test.Simple1$Properties|null)} */ HasExtensions.prototype[".jspb.test.IndirectExtension.simple"] = null; /** * HasExtensions .jspb.test.IndirectExtension.str. - * @type {string|undefined} + * @type {string} */ HasExtensions.prototype[".jspb.test.IndirectExtension.str"] = ""; /** * HasExtensions .jspb.test.IndirectExtension.repeatedStr. - * @type {Array.|undefined} + * @type {Array.} */ HasExtensions.prototype[".jspb.test.IndirectExtension.repeatedStr"] = $util.emptyArray; /** * HasExtensions .jspb.test.IndirectExtension.repeatedSimple. - * @type {Array.|undefined} + * @type {Array.} */ HasExtensions.prototype[".jspb.test.IndirectExtension.repeatedSimple"] = $util.emptyArray; /** * HasExtensions .jspb.test.simple1. - * @type {jspb.test.Simple1$Properties|undefined} + * @type {(jspb.test.Simple1$Properties|null)} */ HasExtensions.prototype[".jspb.test.simple1"] = null; @@ -1960,19 +1960,19 @@ $root.jspb = (function() { /** * Complex aNestedMessage. - * @type {jspb.test.Complex.Nested$Properties|undefined} + * @type {(jspb.test.Complex.Nested$Properties|null)} */ Complex.prototype.aNestedMessage = null; /** * Complex aRepeatedMessage. - * @type {Array.|undefined} + * @type {Array.} */ Complex.prototype.aRepeatedMessage = $util.emptyArray; /** * Complex aRepeatedString. - * @type {Array.|undefined} + * @type {Array.} */ Complex.prototype.aRepeatedString = $util.emptyArray; @@ -2561,7 +2561,7 @@ $root.jspb = (function() { /** * Complex innerComplexField. - * @type {number|undefined} + * @type {number} */ Complex.prototype.innerComplexField = 0; @@ -2738,7 +2738,7 @@ $root.jspb = (function() { /** * IsExtension ext1. - * @type {string|undefined} + * @type {string} */ IsExtension.prototype.ext1 = ""; @@ -3066,37 +3066,37 @@ $root.jspb = (function() { /** * DefaultValues stringField. - * @type {string|undefined} + * @type {string} */ DefaultValues.prototype.stringField = "default<>abc"; /** * DefaultValues boolField. - * @type {boolean|undefined} + * @type {boolean} */ DefaultValues.prototype.boolField = true; /** * DefaultValues intField. - * @type {number|Long|undefined} + * @type {number|Long} */ DefaultValues.prototype.intField = $util.Long ? $util.Long.fromBits(11,0,false) : 11; /** * DefaultValues enumField. - * @type {jspb.test.DefaultValues.Enum|undefined} + * @type {jspb.test.DefaultValues.Enum} */ DefaultValues.prototype.enumField = 13; /** * DefaultValues emptyField. - * @type {string|undefined} + * @type {string} */ DefaultValues.prototype.emptyField = ""; /** * DefaultValues bytesField. - * @type {Uint8Array|undefined} + * @type {Uint8Array} */ DefaultValues.prototype.bytesField = $util.newBuffer([109,111,111]); @@ -3394,7 +3394,7 @@ $root.jspb = (function() { /** * FloatingPointFields optionalFloatField. - * @type {number|undefined} + * @type {number} */ FloatingPointFields.prototype.optionalFloatField = 0; @@ -3406,19 +3406,19 @@ $root.jspb = (function() { /** * FloatingPointFields repeatedFloatField. - * @type {Array.|undefined} + * @type {Array.} */ FloatingPointFields.prototype.repeatedFloatField = $util.emptyArray; /** * FloatingPointFields defaultFloatField. - * @type {number|undefined} + * @type {number} */ FloatingPointFields.prototype.defaultFloatField = 2; /** * FloatingPointFields optionalDoubleField. - * @type {number|undefined} + * @type {number} */ FloatingPointFields.prototype.optionalDoubleField = 0; @@ -3430,13 +3430,13 @@ $root.jspb = (function() { /** * FloatingPointFields repeatedDoubleField. - * @type {Array.|undefined} + * @type {Array.} */ FloatingPointFields.prototype.repeatedDoubleField = $util.emptyArray; /** * FloatingPointFields defaultDoubleField. - * @type {number|undefined} + * @type {number} */ FloatingPointFields.prototype.defaultDoubleField = 2; @@ -3750,37 +3750,37 @@ $root.jspb = (function() { /** * TestClone str. - * @type {string|undefined} + * @type {string} */ TestClone.prototype.str = ""; /** * TestClone simple1. - * @type {jspb.test.Simple1$Properties|undefined} + * @type {(jspb.test.Simple1$Properties|null)} */ TestClone.prototype.simple1 = null; /** * TestClone simple2. - * @type {Array.|undefined} + * @type {Array.} */ TestClone.prototype.simple2 = $util.emptyArray; /** * TestClone bytesField. - * @type {Uint8Array|undefined} + * @type {Uint8Array} */ TestClone.prototype.bytesField = $util.newBuffer([]); /** * TestClone unused. - * @type {string|undefined} + * @type {string} */ TestClone.prototype.unused = ""; /** * TestClone .jspb.test.CloneExtension.extField. - * @type {jspb.test.CloneExtension$Properties|undefined} + * @type {(jspb.test.CloneExtension$Properties|null)} */ TestClone.prototype[".jspb.test.CloneExtension.extField"] = null; @@ -4054,7 +4054,7 @@ $root.jspb = (function() { /** * CloneExtension ext. - * @type {string|undefined} + * @type {string} */ CloneExtension.prototype.ext = ""; @@ -4234,7 +4234,7 @@ $root.jspb = (function() { /** * TestGroup repeatedGroup. - * @type {Array.|undefined} + * @type {Array.} */ TestGroup.prototype.repeatedGroup = $util.emptyArray; @@ -4246,13 +4246,13 @@ $root.jspb = (function() { /** * TestGroup optionalGroup. - * @type {jspb.test.TestGroup.OptionalGroup$Properties|undefined} + * @type {(jspb.test.TestGroup.OptionalGroup$Properties|null)} */ TestGroup.prototype.optionalGroup = null; /** * TestGroup id. - * @type {string|undefined} + * @type {string} */ TestGroup.prototype.id = ""; @@ -4264,7 +4264,7 @@ $root.jspb = (function() { /** * TestGroup optionalSimple. - * @type {jspb.test.Simple2$Properties|undefined} + * @type {(jspb.test.Simple2$Properties|null)} */ TestGroup.prototype.optionalSimple = null; @@ -4548,7 +4548,7 @@ $root.jspb = (function() { /** * RepeatedGroup someBool. - * @type {Array.|undefined} + * @type {Array.} */ RepeatedGroup.prototype.someBool = $util.emptyArray; @@ -5113,7 +5113,7 @@ $root.jspb = (function() { /** * TestGroup1 group. - * @type {jspb.test.TestGroup.RepeatedGroup$Properties|undefined} + * @type {(jspb.test.TestGroup.RepeatedGroup$Properties|null)} */ TestGroup1.prototype.group = null; @@ -5293,13 +5293,13 @@ $root.jspb = (function() { /** * TestReservedNames extension. - * @type {number|undefined} + * @type {number} */ TestReservedNames.prototype.extension = 0; /** * TestReservedNames .jspb.test.TestReservedNamesExtension.foo. - * @type {number|undefined} + * @type {number} */ TestReservedNames.prototype[".jspb.test.TestReservedNamesExtension.foo"] = 0; @@ -5646,61 +5646,61 @@ $root.jspb = (function() { /** * TestMessageWithOneof pone. - * @type {string|undefined} + * @type {string} */ TestMessageWithOneof.prototype.pone = ""; /** * TestMessageWithOneof pthree. - * @type {string|undefined} + * @type {string} */ TestMessageWithOneof.prototype.pthree = ""; /** * TestMessageWithOneof rone. - * @type {jspb.test.TestMessageWithOneof$Properties|undefined} + * @type {(jspb.test.TestMessageWithOneof$Properties|null)} */ TestMessageWithOneof.prototype.rone = null; /** * TestMessageWithOneof rtwo. - * @type {string|undefined} + * @type {string} */ TestMessageWithOneof.prototype.rtwo = ""; /** * TestMessageWithOneof normalField. - * @type {boolean|undefined} + * @type {boolean} */ TestMessageWithOneof.prototype.normalField = false; /** * TestMessageWithOneof repeatedField. - * @type {Array.|undefined} + * @type {Array.} */ TestMessageWithOneof.prototype.repeatedField = $util.emptyArray; /** * TestMessageWithOneof aone. - * @type {number|undefined} + * @type {number} */ TestMessageWithOneof.prototype.aone = 1234; /** * TestMessageWithOneof atwo. - * @type {number|undefined} + * @type {number} */ TestMessageWithOneof.prototype.atwo = 0; /** * TestMessageWithOneof bone. - * @type {number|undefined} + * @type {number} */ TestMessageWithOneof.prototype.bone = 0; /** * TestMessageWithOneof btwo. - * @type {number|undefined} + * @type {number} */ TestMessageWithOneof.prototype.btwo = 1234; @@ -6096,13 +6096,13 @@ $root.jspb = (function() { /** * TestEndsWithBytes value. - * @type {number|undefined} + * @type {number} */ TestEndsWithBytes.prototype.value = 0; /** * TestEndsWithBytes data. - * @type {Uint8Array|undefined} + * @type {Uint8Array} */ TestEndsWithBytes.prototype.data = $util.newBuffer([]); @@ -6315,73 +6315,73 @@ $root.jspb = (function() { /** * TestMapFieldsNoBinary mapStringString. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapStringString = $util.emptyObject; /** * TestMapFieldsNoBinary mapStringInt32. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapStringInt32 = $util.emptyObject; /** * TestMapFieldsNoBinary mapStringInt64. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapStringInt64 = $util.emptyObject; /** * TestMapFieldsNoBinary mapStringBool. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapStringBool = $util.emptyObject; /** * TestMapFieldsNoBinary mapStringDouble. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapStringDouble = $util.emptyObject; /** * TestMapFieldsNoBinary mapStringEnum. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapStringEnum = $util.emptyObject; /** * TestMapFieldsNoBinary mapStringMsg. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapStringMsg = $util.emptyObject; /** * TestMapFieldsNoBinary mapInt32String. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapInt32String = $util.emptyObject; /** * TestMapFieldsNoBinary mapInt64String. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapInt64String = $util.emptyObject; /** * TestMapFieldsNoBinary mapBoolString. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapBoolString = $util.emptyObject; /** * TestMapFieldsNoBinary testMapFields. - * @type {jspb.test.TestMapFieldsNoBinary$Properties|undefined} + * @type {(jspb.test.TestMapFieldsNoBinary$Properties|null)} */ TestMapFieldsNoBinary.prototype.testMapFields = null; /** * TestMapFieldsNoBinary mapStringTestmapfields. - * @type {Object.|undefined} + * @type {Object.} */ TestMapFieldsNoBinary.prototype.mapStringTestmapfields = $util.emptyObject; @@ -6984,7 +6984,7 @@ $root.jspb = (function() { /** * MapValueMessageNoBinary foo. - * @type {number|undefined} + * @type {number} */ MapValueMessageNoBinary.prototype.foo = 0; @@ -7450,7 +7450,7 @@ $root.jspb = (function() { /** * Message count. - * @type {number|undefined} + * @type {number} */ Message.prototype.count = 0; @@ -7655,7 +7655,7 @@ $root.google = (function() { /** * FileDescriptorSet file. - * @type {Array.|undefined} + * @type {Array.} */ FileDescriptorSet.prototype.file = $util.emptyArray; @@ -7867,73 +7867,73 @@ $root.google = (function() { /** * FileDescriptorProto name. - * @type {string|undefined} + * @type {string} */ FileDescriptorProto.prototype.name = ""; /** * FileDescriptorProto package. - * @type {string|undefined} + * @type {string} */ FileDescriptorProto.prototype["package"] = ""; /** * FileDescriptorProto dependency. - * @type {Array.|undefined} + * @type {Array.} */ FileDescriptorProto.prototype.dependency = $util.emptyArray; /** * FileDescriptorProto publicDependency. - * @type {Array.|undefined} + * @type {Array.} */ FileDescriptorProto.prototype.publicDependency = $util.emptyArray; /** * FileDescriptorProto weakDependency. - * @type {Array.|undefined} + * @type {Array.} */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; /** * FileDescriptorProto messageType. - * @type {Array.|undefined} + * @type {Array.} */ FileDescriptorProto.prototype.messageType = $util.emptyArray; /** * FileDescriptorProto enumType. - * @type {Array.|undefined} + * @type {Array.} */ FileDescriptorProto.prototype.enumType = $util.emptyArray; /** * FileDescriptorProto service. - * @type {Array.|undefined} + * @type {Array.} */ FileDescriptorProto.prototype.service = $util.emptyArray; /** * FileDescriptorProto extension. - * @type {Array.|undefined} + * @type {Array.} */ FileDescriptorProto.prototype.extension = $util.emptyArray; /** * FileDescriptorProto options. - * @type {google.protobuf.FileOptions$Properties|undefined} + * @type {(google.protobuf.FileOptions$Properties|null)} */ FileDescriptorProto.prototype.options = null; /** * FileDescriptorProto sourceCodeInfo. - * @type {google.protobuf.SourceCodeInfo$Properties|undefined} + * @type {(google.protobuf.SourceCodeInfo$Properties|null)} */ FileDescriptorProto.prototype.sourceCodeInfo = null; /** * FileDescriptorProto syntax. - * @type {string|undefined} + * @type {string} */ FileDescriptorProto.prototype.syntax = ""; @@ -8415,61 +8415,61 @@ $root.google = (function() { /** * DescriptorProto name. - * @type {string|undefined} + * @type {string} */ DescriptorProto.prototype.name = ""; /** * DescriptorProto field. - * @type {Array.|undefined} + * @type {Array.} */ DescriptorProto.prototype.field = $util.emptyArray; /** * DescriptorProto extension. - * @type {Array.|undefined} + * @type {Array.} */ DescriptorProto.prototype.extension = $util.emptyArray; /** * DescriptorProto nestedType. - * @type {Array.|undefined} + * @type {Array.} */ DescriptorProto.prototype.nestedType = $util.emptyArray; /** * DescriptorProto enumType. - * @type {Array.|undefined} + * @type {Array.} */ DescriptorProto.prototype.enumType = $util.emptyArray; /** * DescriptorProto extensionRange. - * @type {Array.|undefined} + * @type {Array.} */ DescriptorProto.prototype.extensionRange = $util.emptyArray; /** * DescriptorProto oneofDecl. - * @type {Array.|undefined} + * @type {Array.} */ DescriptorProto.prototype.oneofDecl = $util.emptyArray; /** * DescriptorProto options. - * @type {google.protobuf.MessageOptions$Properties|undefined} + * @type {(google.protobuf.MessageOptions$Properties|null)} */ DescriptorProto.prototype.options = null; /** * DescriptorProto reservedRange. - * @type {Array.|undefined} + * @type {Array.} */ DescriptorProto.prototype.reservedRange = $util.emptyArray; /** * DescriptorProto reservedName. - * @type {Array.|undefined} + * @type {Array.} */ DescriptorProto.prototype.reservedName = $util.emptyArray; @@ -8921,13 +8921,13 @@ $root.google = (function() { /** * ExtensionRange start. - * @type {number|undefined} + * @type {number} */ ExtensionRange.prototype.start = 0; /** * ExtensionRange end. - * @type {number|undefined} + * @type {number} */ ExtensionRange.prototype.end = 0; @@ -9116,13 +9116,13 @@ $root.google = (function() { /** * ReservedRange start. - * @type {number|undefined} + * @type {number} */ ReservedRange.prototype.start = 0; /** * ReservedRange end. - * @type {number|undefined} + * @type {number} */ ReservedRange.prototype.end = 0; @@ -9322,61 +9322,61 @@ $root.google = (function() { /** * FieldDescriptorProto name. - * @type {string|undefined} + * @type {string} */ FieldDescriptorProto.prototype.name = ""; /** * FieldDescriptorProto number. - * @type {number|undefined} + * @type {number} */ FieldDescriptorProto.prototype.number = 0; /** * FieldDescriptorProto label. - * @type {google.protobuf.FieldDescriptorProto.Label|undefined} + * @type {google.protobuf.FieldDescriptorProto.Label} */ FieldDescriptorProto.prototype.label = 1; /** * FieldDescriptorProto type. - * @type {google.protobuf.FieldDescriptorProto.Type|undefined} + * @type {google.protobuf.FieldDescriptorProto.Type} */ FieldDescriptorProto.prototype.type = 1; /** * FieldDescriptorProto typeName. - * @type {string|undefined} + * @type {string} */ FieldDescriptorProto.prototype.typeName = ""; /** * FieldDescriptorProto extendee. - * @type {string|undefined} + * @type {string} */ FieldDescriptorProto.prototype.extendee = ""; /** * FieldDescriptorProto defaultValue. - * @type {string|undefined} + * @type {string} */ FieldDescriptorProto.prototype.defaultValue = ""; /** * FieldDescriptorProto oneofIndex. - * @type {number|undefined} + * @type {number} */ FieldDescriptorProto.prototype.oneofIndex = 0; /** * FieldDescriptorProto jsonName. - * @type {string|undefined} + * @type {string} */ FieldDescriptorProto.prototype.jsonName = ""; /** * FieldDescriptorProto options. - * @type {google.protobuf.FieldOptions$Properties|undefined} + * @type {(google.protobuf.FieldOptions$Properties|null)} */ FieldDescriptorProto.prototype.options = null; @@ -9849,13 +9849,13 @@ $root.google = (function() { /** * OneofDescriptorProto name. - * @type {string|undefined} + * @type {string} */ OneofDescriptorProto.prototype.name = ""; /** * OneofDescriptorProto options. - * @type {google.protobuf.OneofOptions$Properties|undefined} + * @type {(google.protobuf.OneofOptions$Properties|null)} */ OneofDescriptorProto.prototype.options = null; @@ -10051,19 +10051,19 @@ $root.google = (function() { /** * EnumDescriptorProto name. - * @type {string|undefined} + * @type {string} */ EnumDescriptorProto.prototype.name = ""; /** * EnumDescriptorProto value. - * @type {Array.|undefined} + * @type {Array.} */ EnumDescriptorProto.prototype.value = $util.emptyArray; /** * EnumDescriptorProto options. - * @type {google.protobuf.EnumOptions$Properties|undefined} + * @type {(google.protobuf.EnumOptions$Properties|null)} */ EnumDescriptorProto.prototype.options = null; @@ -10292,19 +10292,19 @@ $root.google = (function() { /** * EnumValueDescriptorProto name. - * @type {string|undefined} + * @type {string} */ EnumValueDescriptorProto.prototype.name = ""; /** * EnumValueDescriptorProto number. - * @type {number|undefined} + * @type {number} */ EnumValueDescriptorProto.prototype.number = 0; /** * EnumValueDescriptorProto options. - * @type {google.protobuf.EnumValueOptions$Properties|undefined} + * @type {(google.protobuf.EnumValueOptions$Properties|null)} */ EnumValueDescriptorProto.prototype.options = null; @@ -10513,19 +10513,19 @@ $root.google = (function() { /** * ServiceDescriptorProto name. - * @type {string|undefined} + * @type {string} */ ServiceDescriptorProto.prototype.name = ""; /** * ServiceDescriptorProto method. - * @type {Array.|undefined} + * @type {Array.} */ ServiceDescriptorProto.prototype.method = $util.emptyArray; /** * ServiceDescriptorProto options. - * @type {google.protobuf.ServiceOptions$Properties|undefined} + * @type {(google.protobuf.ServiceOptions$Properties|null)} */ ServiceDescriptorProto.prototype.options = null; @@ -10757,37 +10757,37 @@ $root.google = (function() { /** * MethodDescriptorProto name. - * @type {string|undefined} + * @type {string} */ MethodDescriptorProto.prototype.name = ""; /** * MethodDescriptorProto inputType. - * @type {string|undefined} + * @type {string} */ MethodDescriptorProto.prototype.inputType = ""; /** * MethodDescriptorProto outputType. - * @type {string|undefined} + * @type {string} */ MethodDescriptorProto.prototype.outputType = ""; /** * MethodDescriptorProto options. - * @type {google.protobuf.MethodOptions$Properties|undefined} + * @type {(google.protobuf.MethodOptions$Properties|null)} */ MethodDescriptorProto.prototype.options = null; /** * MethodDescriptorProto clientStreaming. - * @type {boolean|undefined} + * @type {boolean} */ MethodDescriptorProto.prototype.clientStreaming = false; /** * MethodDescriptorProto serverStreaming. - * @type {boolean|undefined} + * @type {boolean} */ MethodDescriptorProto.prototype.serverStreaming = false; @@ -11047,91 +11047,91 @@ $root.google = (function() { /** * FileOptions javaPackage. - * @type {string|undefined} + * @type {string} */ FileOptions.prototype.javaPackage = ""; /** * FileOptions javaOuterClassname. - * @type {string|undefined} + * @type {string} */ FileOptions.prototype.javaOuterClassname = ""; /** * FileOptions javaMultipleFiles. - * @type {boolean|undefined} + * @type {boolean} */ FileOptions.prototype.javaMultipleFiles = false; /** * FileOptions javaGenerateEqualsAndHash. - * @type {boolean|undefined} + * @type {boolean} */ FileOptions.prototype.javaGenerateEqualsAndHash = false; /** * FileOptions javaStringCheckUtf8. - * @type {boolean|undefined} + * @type {boolean} */ FileOptions.prototype.javaStringCheckUtf8 = false; /** * FileOptions optimizeFor. - * @type {google.protobuf.FileOptions.OptimizeMode|undefined} + * @type {google.protobuf.FileOptions.OptimizeMode} */ FileOptions.prototype.optimizeFor = 1; /** * FileOptions goPackage. - * @type {string|undefined} + * @type {string} */ FileOptions.prototype.goPackage = ""; /** * FileOptions ccGenericServices. - * @type {boolean|undefined} + * @type {boolean} */ FileOptions.prototype.ccGenericServices = false; /** * FileOptions javaGenericServices. - * @type {boolean|undefined} + * @type {boolean} */ FileOptions.prototype.javaGenericServices = false; /** * FileOptions pyGenericServices. - * @type {boolean|undefined} + * @type {boolean} */ FileOptions.prototype.pyGenericServices = false; /** * FileOptions deprecated. - * @type {boolean|undefined} + * @type {boolean} */ FileOptions.prototype.deprecated = false; /** * FileOptions ccEnableArenas. - * @type {boolean|undefined} + * @type {boolean} */ FileOptions.prototype.ccEnableArenas = false; /** * FileOptions objcClassPrefix. - * @type {string|undefined} + * @type {string} */ FileOptions.prototype.objcClassPrefix = ""; /** * FileOptions csharpNamespace. - * @type {string|undefined} + * @type {string} */ FileOptions.prototype.csharpNamespace = ""; /** * FileOptions uninterpretedOption. - * @type {Array.|undefined} + * @type {Array.} */ FileOptions.prototype.uninterpretedOption = $util.emptyArray; @@ -11549,31 +11549,31 @@ $root.google = (function() { /** * MessageOptions messageSetWireFormat. - * @type {boolean|undefined} + * @type {boolean} */ MessageOptions.prototype.messageSetWireFormat = false; /** * MessageOptions noStandardDescriptorAccessor. - * @type {boolean|undefined} + * @type {boolean} */ MessageOptions.prototype.noStandardDescriptorAccessor = false; /** * MessageOptions deprecated. - * @type {boolean|undefined} + * @type {boolean} */ MessageOptions.prototype.deprecated = false; /** * MessageOptions mapEntry. - * @type {boolean|undefined} + * @type {boolean} */ MessageOptions.prototype.mapEntry = false; /** * MessageOptions uninterpretedOption. - * @type {Array.|undefined} + * @type {Array.} */ MessageOptions.prototype.uninterpretedOption = $util.emptyArray; @@ -11828,43 +11828,43 @@ $root.google = (function() { /** * FieldOptions ctype. - * @type {google.protobuf.FieldOptions.CType|undefined} + * @type {google.protobuf.FieldOptions.CType} */ FieldOptions.prototype.ctype = 0; /** * FieldOptions packed. - * @type {boolean|undefined} + * @type {boolean} */ FieldOptions.prototype.packed = false; /** * FieldOptions jstype. - * @type {google.protobuf.FieldOptions.JSType|undefined} + * @type {google.protobuf.FieldOptions.JSType} */ FieldOptions.prototype.jstype = 0; /** * FieldOptions lazy. - * @type {boolean|undefined} + * @type {boolean} */ FieldOptions.prototype.lazy = false; /** * FieldOptions deprecated. - * @type {boolean|undefined} + * @type {boolean} */ FieldOptions.prototype.deprecated = false; /** * FieldOptions weak. - * @type {boolean|undefined} + * @type {boolean} */ FieldOptions.prototype.weak = false; /** * FieldOptions uninterpretedOption. - * @type {Array.|undefined} + * @type {Array.} */ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; @@ -12209,7 +12209,7 @@ $root.google = (function() { /** * OneofOptions uninterpretedOption. - * @type {Array.|undefined} + * @type {Array.} */ OneofOptions.prototype.uninterpretedOption = $util.emptyArray; @@ -12407,25 +12407,25 @@ $root.google = (function() { /** * EnumOptions allowAlias. - * @type {boolean|undefined} + * @type {boolean} */ EnumOptions.prototype.allowAlias = false; /** * EnumOptions deprecated. - * @type {boolean|undefined} + * @type {boolean} */ EnumOptions.prototype.deprecated = false; /** * EnumOptions uninterpretedOption. - * @type {Array.|undefined} + * @type {Array.} */ EnumOptions.prototype.uninterpretedOption = $util.emptyArray; /** * EnumOptions .jspb.test.IsExtension.simpleOption. - * @type {string|undefined} + * @type {string} */ EnumOptions.prototype[".jspb.test.IsExtension.simpleOption"] = ""; @@ -12662,13 +12662,13 @@ $root.google = (function() { /** * EnumValueOptions deprecated. - * @type {boolean|undefined} + * @type {boolean} */ EnumValueOptions.prototype.deprecated = false; /** * EnumValueOptions uninterpretedOption. - * @type {Array.|undefined} + * @type {Array.} */ EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; @@ -12878,13 +12878,13 @@ $root.google = (function() { /** * ServiceOptions deprecated. - * @type {boolean|undefined} + * @type {boolean} */ ServiceOptions.prototype.deprecated = false; /** * ServiceOptions uninterpretedOption. - * @type {Array.|undefined} + * @type {Array.} */ ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; @@ -13095,19 +13095,19 @@ $root.google = (function() { /** * MethodOptions deprecated. - * @type {boolean|undefined} + * @type {boolean} */ MethodOptions.prototype.deprecated = false; /** * MethodOptions idempotencyLevel. - * @type {google.protobuf.MethodOptions.IdempotencyLevel|undefined} + * @type {google.protobuf.MethodOptions.IdempotencyLevel} */ MethodOptions.prototype.idempotencyLevel = 0; /** * MethodOptions uninterpretedOption. - * @type {Array.|undefined} + * @type {Array.} */ MethodOptions.prototype.uninterpretedOption = $util.emptyArray; @@ -13371,43 +13371,43 @@ $root.google = (function() { /** * UninterpretedOption name. - * @type {Array.|undefined} + * @type {Array.} */ UninterpretedOption.prototype.name = $util.emptyArray; /** * UninterpretedOption identifierValue. - * @type {string|undefined} + * @type {string} */ UninterpretedOption.prototype.identifierValue = ""; /** * UninterpretedOption positiveIntValue. - * @type {number|Long|undefined} + * @type {number|Long} */ UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * UninterpretedOption negativeIntValue. - * @type {number|Long|undefined} + * @type {number|Long} */ UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * UninterpretedOption doubleValue. - * @type {number|undefined} + * @type {number} */ UninterpretedOption.prototype.doubleValue = 0; /** * UninterpretedOption stringValue. - * @type {Uint8Array|undefined} + * @type {Uint8Array} */ UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** * UninterpretedOption aggregateValue. - * @type {string|undefined} + * @type {string} */ UninterpretedOption.prototype.aggregateValue = ""; @@ -13908,7 +13908,7 @@ $root.google = (function() { /** * SourceCodeInfo location. - * @type {Array.|undefined} + * @type {Array.} */ SourceCodeInfo.prototype.location = $util.emptyArray; @@ -14106,31 +14106,31 @@ $root.google = (function() { /** * Location path. - * @type {Array.|undefined} + * @type {Array.} */ Location.prototype.path = $util.emptyArray; /** * Location span. - * @type {Array.|undefined} + * @type {Array.} */ Location.prototype.span = $util.emptyArray; /** * Location leadingComments. - * @type {string|undefined} + * @type {string} */ Location.prototype.leadingComments = ""; /** * Location trailingComments. - * @type {string|undefined} + * @type {string} */ Location.prototype.trailingComments = ""; /** * Location leadingDetachedComments. - * @type {Array.|undefined} + * @type {Array.} */ Location.prototype.leadingDetachedComments = $util.emptyArray; @@ -14424,7 +14424,7 @@ $root.google = (function() { /** * GeneratedCodeInfo annotation. - * @type {Array.|undefined} + * @type {Array.} */ GeneratedCodeInfo.prototype.annotation = $util.emptyArray; @@ -14619,25 +14619,25 @@ $root.google = (function() { /** * Annotation path. - * @type {Array.|undefined} + * @type {Array.} */ Annotation.prototype.path = $util.emptyArray; /** * Annotation sourceFile. - * @type {string|undefined} + * @type {string} */ Annotation.prototype.sourceFile = ""; /** * Annotation begin. - * @type {number|undefined} + * @type {number} */ Annotation.prototype.begin = 0; /** * Annotation end. - * @type {number|undefined} + * @type {number} */ Annotation.prototype.end = 0;