diff --git a/google-protobuf/google-protobuf-tests.ts b/google-protobuf/google-protobuf-tests.ts index b53d59c595..389a3b117a 100644 --- a/google-protobuf/google-protobuf-tests.ts +++ b/google-protobuf/google-protobuf-tests.ts @@ -54,22 +54,22 @@ class MySimple extends jspb.Message { }; static toObject(includeInstance: boolean, msg: MySimple): {} { - var f, obj = { + const obj = { myString: jspb.Message.getFieldWithDefault(msg, 1, ""), myBool: jspb.Message.getFieldWithDefault(msg, 2, false), someLabelsList: jspb.Message.getField(msg, 3), - someCodeGeneratorRequest: (f = msg.getSomeCodeGeneratorRequest()) && google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.toObject(includeInstance, f), - someAny: (f = msg.getSomeAny()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), - someMethod: (f = msg.getSomeMethod()) && google_protobuf_api_pb.Method.toObject(includeInstance, f), - someGeneratedCodeInfo: (f = msg.getSomeGeneratedCodeInfo()) && google_protobuf_descriptor_pb.GeneratedCodeInfo.toObject(includeInstance, f), - someDuration: (f = msg.getSomeDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - someEmpty: (f = msg.getSomeEmpty()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f), - someFieldMask: (f = msg.getSomeFieldMask()) && google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, f), - someSourceContext: (f = msg.getSomeSourceContext()) && google_protobuf_source_context_pb.SourceContext.toObject(includeInstance, f), - someStruct: (f = msg.getSomeStruct()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), - someTimestamp: (f = msg.getSomeTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - someType: (f = msg.getSomeType()) && google_protobuf_type_pb.Type.toObject(includeInstance, f), - someDoubleValue: (f = msg.getSomeDoubleValue()) && google_protobuf_wrappers_pb.DoubleValue.toObject(includeInstance, f) + someCodeGeneratorRequest: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.toObject(includeInstance, msg.getSomeCodeGeneratorRequest()), + someAny: google_protobuf_any_pb.Any.toObject(includeInstance, msg.getSomeAny()), + someMethod: google_protobuf_api_pb.Method.toObject(includeInstance, msg.getSomeMethod()), + someGeneratedCodeInfo: google_protobuf_descriptor_pb.GeneratedCodeInfo.toObject(includeInstance, msg.getSomeGeneratedCodeInfo()), + someDuration: google_protobuf_duration_pb.Duration.toObject(includeInstance, msg.getSomeDuration()), + someEmpty: google_protobuf_empty_pb.Empty.toObject(includeInstance, msg.getSomeEmpty()), + someFieldMask: google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, msg.getSomeFieldMask()), + someSourceContext: google_protobuf_source_context_pb.SourceContext.toObject(includeInstance, msg.getSomeSourceContext()), + someStruct: google_protobuf_struct_pb.Struct.toObject(includeInstance, msg.getSomeStruct()), + someTimestamp: google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, msg.getSomeTimestamp()), + someType: google_protobuf_type_pb.Type.toObject(includeInstance, msg.getSomeType()), + someDoubleValue: google_protobuf_wrappers_pb.DoubleValue.toObject(includeInstance, msg.getSomeDoubleValue()), }; if (includeInstance) { @@ -179,121 +179,120 @@ class MySimple extends jspb.Message { }; static serializeBinaryToWriter(message: MySimple, writer: jspb.BinaryWriter) { - var f = undefined; - f = message.getMyString(); - if (f.length > 0) { + const f1 = message.getMyString(); + if (f1.length > 0) { writer.writeString( 1, - f + f1 ); } - f = message.getMyBool(); - if (f) { + const f2 = message.getMyBool(); + if (f2) { writer.writeBool( 2, - f + f2 ); } - f = message.getSomeLabelsList(); - if (f.length > 0) { + const f3 = message.getSomeLabelsList(); + if (f3.length > 0) { writer.writeRepeatedString( 3, - f + f3 ); } - f = message.getSomeCodeGeneratorRequest(); - if (f != null) { + const f4 = message.getSomeCodeGeneratorRequest(); + if (f4 != null) { writer.writeMessage( 4, - f, + f4, google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.serializeBinaryToWriter ); } - f = message.getSomeAny(); - if (f != null) { + const f5 = message.getSomeAny(); + if (f5 != null) { writer.writeMessage( 5, - f, + f5, google_protobuf_any_pb.Any.serializeBinaryToWriter ); } - f = message.getSomeMethod(); - if (f != null) { + const f6 = message.getSomeMethod(); + if (f6 != null) { writer.writeMessage( 6, - f, + f6, google_protobuf_api_pb.Method.serializeBinaryToWriter ); } - f = message.getSomeGeneratedCodeInfo(); - if (f != null) { + const f7 = message.getSomeGeneratedCodeInfo(); + if (f7 != null) { writer.writeMessage( 7, - f, + f7, google_protobuf_descriptor_pb.GeneratedCodeInfo.serializeBinaryToWriter ); } - f = message.getSomeDuration(); - if (f != null) { + const f8 = message.getSomeDuration(); + if (f8 != null) { writer.writeMessage( 8, - f, + f8, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } - f = message.getSomeEmpty(); - if (f != null) { + const f9 = message.getSomeEmpty(); + if (f9 != null) { writer.writeMessage( 9, - f, + f9, google_protobuf_empty_pb.Empty.serializeBinaryToWriter ); } - f = message.getSomeFieldMask(); - if (f != null) { + const f10 = message.getSomeFieldMask(); + if (f10 != null) { writer.writeMessage( 10, - f, + f10, google_protobuf_field_mask_pb.FieldMask.serializeBinaryToWriter ); } - f = message.getSomeSourceContext(); - if (f != null) { + const f11 = message.getSomeSourceContext(); + if (f11 != null) { writer.writeMessage( 11, - f, + f11, google_protobuf_source_context_pb.SourceContext.serializeBinaryToWriter ); } - f = message.getSomeStruct(); - if (f != null) { + const f12 = message.getSomeStruct(); + if (f12 != null) { writer.writeMessage( 12, - f, + f12, google_protobuf_struct_pb.Struct.serializeBinaryToWriter ); } - f = message.getSomeTimestamp(); - if (f != null) { + const f13 = message.getSomeTimestamp(); + if (f13 != null) { writer.writeMessage( 13, - f, + f13, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getSomeType(); - if (f != null) { + const f14 = message.getSomeType(); + if (f14 != null) { writer.writeMessage( 14, - f, + f14, google_protobuf_type_pb.Type.serializeBinaryToWriter ); } - f = message.getSomeDoubleValue(); - if (f != null) { + const f15 = message.getSomeDoubleValue(); + if (f15 != null) { writer.writeMessage( 15, - f, + f15, google_protobuf_wrappers_pb.DoubleValue.serializeBinaryToWriter ); } @@ -331,8 +330,8 @@ class MySimple extends jspb.Message { this.setSomeLabelsList([]); }; - getSomeCodeGeneratorRequest(): google_protobuf_compiler_plugin_pb.CodeGeneratorRequest | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_compiler_plugin_pb.CodeGeneratorRequest, 4) as google_protobuf_compiler_plugin_pb.CodeGeneratorRequest | undefined; + getSomeCodeGeneratorRequest(): google_protobuf_compiler_plugin_pb.CodeGeneratorRequest { + return jspb.Message.getWrapperField(this, google_protobuf_compiler_plugin_pb.CodeGeneratorRequest, 4) as google_protobuf_compiler_plugin_pb.CodeGeneratorRequest; }; setSomeCodeGeneratorRequest(value?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest) { @@ -347,8 +346,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 4) != null; }; - getSomeAny(): google_protobuf_any_pb.Any | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5) as google_protobuf_any_pb.Any | undefined; + getSomeAny(): google_protobuf_any_pb.Any { + return jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5) as google_protobuf_any_pb.Any; }; setSomeAny(value?: google_protobuf_any_pb.Any) { @@ -363,8 +362,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 5) != null; }; - getSomeMethod(): google_protobuf_api_pb.Method | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_api_pb.Method, 6) as google_protobuf_api_pb.Method | undefined; + getSomeMethod(): google_protobuf_api_pb.Method { + return jspb.Message.getWrapperField(this, google_protobuf_api_pb.Method, 6) as google_protobuf_api_pb.Method; }; setSomeMethod(value?: google_protobuf_api_pb.Method) { @@ -379,8 +378,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 6) != null; }; - getSomeGeneratedCodeInfo(): google_protobuf_descriptor_pb.GeneratedCodeInfo|undefined { - return jspb.Message.getWrapperField(this, google_protobuf_descriptor_pb.GeneratedCodeInfo, 7) as google_protobuf_descriptor_pb.GeneratedCodeInfo | undefined; + getSomeGeneratedCodeInfo(): google_protobuf_descriptor_pb.GeneratedCodeInfo { + return jspb.Message.getWrapperField(this, google_protobuf_descriptor_pb.GeneratedCodeInfo, 7) as google_protobuf_descriptor_pb.GeneratedCodeInfo; }; setSomeGeneratedCodeInfo(value?: google_protobuf_descriptor_pb.GeneratedCodeInfo) { @@ -395,8 +394,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 7) != null; }; - getSomeDuration(): google_protobuf_duration_pb.Duration | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 8) as google_protobuf_duration_pb.Duration | undefined; + getSomeDuration(): google_protobuf_duration_pb.Duration { + return jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 8) as google_protobuf_duration_pb.Duration; }; setSomeDuration(value?: google_protobuf_duration_pb.Duration) { @@ -411,8 +410,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 8) != null; }; - getSomeEmpty(): google_protobuf_empty_pb.Empty | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 9) as google_protobuf_empty_pb.Empty | undefined; + getSomeEmpty(): google_protobuf_empty_pb.Empty { + return jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 9) as google_protobuf_empty_pb.Empty; }; setSomeEmpty(value?: google_protobuf_empty_pb.Empty) { @@ -427,8 +426,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 9) != null; }; - getSomeFieldMask(): google_protobuf_field_mask_pb.FieldMask | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 10) as google_protobuf_field_mask_pb.FieldMask | undefined; + getSomeFieldMask(): google_protobuf_field_mask_pb.FieldMask { + return jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 10) as google_protobuf_field_mask_pb.FieldMask; }; setSomeFieldMask(value?: google_protobuf_field_mask_pb.FieldMask) { @@ -443,8 +442,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 10) != null; }; - getSomeSourceContext(): google_protobuf_source_context_pb.SourceContext | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_source_context_pb.SourceContext, 11) as google_protobuf_source_context_pb.SourceContext | undefined; + getSomeSourceContext(): google_protobuf_source_context_pb.SourceContext { + return jspb.Message.getWrapperField(this, google_protobuf_source_context_pb.SourceContext, 11) as google_protobuf_source_context_pb.SourceContext; }; setSomeSourceContext(value?: google_protobuf_source_context_pb.SourceContext) { @@ -459,8 +458,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 11) != null; }; - getSomeStruct(): google_protobuf_struct_pb.Struct | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 12) as google_protobuf_struct_pb.Struct | undefined; + getSomeStruct(): google_protobuf_struct_pb.Struct { + return jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 12) as google_protobuf_struct_pb.Struct; }; setSomeStruct(value?: google_protobuf_struct_pb.Struct) { @@ -475,8 +474,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 12) != null; }; - getSomeTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 13) as google_protobuf_timestamp_pb.Timestamp | undefined; + getSomeTimestamp(): google_protobuf_timestamp_pb.Timestamp { + return jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 13) as google_protobuf_timestamp_pb.Timestamp; }; setSomeTimestamp(value?: google_protobuf_timestamp_pb.Timestamp) { @@ -491,8 +490,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 13) != null; }; - getSomeType(): google_protobuf_type_pb.Type | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_type_pb.Type, 14) as google_protobuf_type_pb.Type | undefined; + getSomeType(): google_protobuf_type_pb.Type { + return jspb.Message.getWrapperField(this, google_protobuf_type_pb.Type, 14) as google_protobuf_type_pb.Type; }; setSomeType(value?: google_protobuf_type_pb.Type) { @@ -507,8 +506,8 @@ class MySimple extends jspb.Message { return jspb.Message.getField(this, 14) != null; }; - getSomeDoubleValue(): google_protobuf_wrappers_pb.DoubleValue | undefined { - return jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.DoubleValue, 15) as google_protobuf_wrappers_pb.DoubleValue | undefined; + getSomeDoubleValue(): google_protobuf_wrappers_pb.DoubleValue { + return jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.DoubleValue, 15) as google_protobuf_wrappers_pb.DoubleValue; }; setSomeDoubleValue(value?: google_protobuf_wrappers_pb.DoubleValue) { diff --git a/google-protobuf/google/protobuf/any_pb.d.ts b/google-protobuf/google/protobuf/any_pb.d.ts index 97d49054a2..b1e275570a 100644 --- a/google-protobuf/google/protobuf/any_pb.d.ts +++ b/google-protobuf/google/protobuf/any_pb.d.ts @@ -14,11 +14,19 @@ export class Any extends jspb.Message { unpack(deserialize: (packed: Uint8Array) => T, name: string): T | null; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Any): {}; + toObject(includeInstance?: boolean): Any.AsObject; + static toObject(includeInstance: boolean, msg: Any): Any.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Any, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Any; static deserializeBinaryFromReader(message: Any, reader: jspb.BinaryReader): Any; } + +export namespace Any { + export type AsObject = { + typeUrl: string, + value: Uint8Array | string, + } +} + diff --git a/google-protobuf/google/protobuf/api_pb.d.ts b/google-protobuf/google/protobuf/api_pb.d.ts index dd89e7782f..a7ba91088c 100644 --- a/google-protobuf/google/protobuf/api_pb.d.ts +++ b/google-protobuf/google/protobuf/api_pb.d.ts @@ -33,8 +33,8 @@ export class Api extends jspb.Message { setSyntax(value: google_protobuf_type_pb.Syntax): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Api): {}; + toObject(includeInstance?: boolean): Api.AsObject; + static toObject(includeInstance: boolean, msg: Api): Api.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Api, writer: jspb.BinaryWriter): void; @@ -42,6 +42,18 @@ export class Api extends jspb.Message { static deserializeBinaryFromReader(message: Api, reader: jspb.BinaryReader): Api; } +export namespace Api { + export type AsObject = { + name: string, + methodsList: Array, + optionsList: Array, + version: string, + sourceContext: google_protobuf_source_context_pb.SourceContext.AsObject, + mixinsList: Array, + syntax: google_protobuf_type_pb.Syntax, + } +} + export class Method extends jspb.Message { getName(): string; setName(value: string): void; @@ -67,8 +79,8 @@ export class Method extends jspb.Message { setSyntax(value: google_protobuf_type_pb.Syntax): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Method): {}; + toObject(includeInstance?: boolean): Method.AsObject; + static toObject(includeInstance: boolean, msg: Method): Method.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Method, writer: jspb.BinaryWriter): void; @@ -76,6 +88,18 @@ export class Method extends jspb.Message { static deserializeBinaryFromReader(message: Method, reader: jspb.BinaryReader): Method; } +export namespace Method { + export type AsObject = { + name: string, + requestTypeUrl: string, + requestStreaming: boolean, + responseTypeUrl: string, + responseStreaming: boolean, + optionsList: Array, + syntax: google_protobuf_type_pb.Syntax, + } +} + export class Mixin extends jspb.Message { getName(): string; setName(value: string): void; @@ -84,11 +108,19 @@ export class Mixin extends jspb.Message { setRoot(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Mixin): {}; + toObject(includeInstance?: boolean): Mixin.AsObject; + static toObject(includeInstance: boolean, msg: Mixin): Mixin.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Mixin, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Mixin; static deserializeBinaryFromReader(message: Mixin, reader: jspb.BinaryReader): Mixin; } + +export namespace Mixin { + export type AsObject = { + name: string, + root: string, + } +} + diff --git a/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts b/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts index be1f4c28fb..0e3491e702 100644 --- a/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts +++ b/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts @@ -22,16 +22,25 @@ export class Version extends jspb.Message { getSuffix(): string; setSuffix(value: string): void; - static deserializeBinary(bytes: Uint8Array): Version; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Version): {}; + toObject(includeInstance?: boolean): Version.AsObject; + static toObject(includeInstance: boolean, msg: Version): Version.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Version, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Version; static deserializeBinaryFromReader(message: Version, reader: jspb.BinaryReader): Version; } +export namespace Version { + export type AsObject = { + major: number, + minor: number, + patch: number, + suffix: string, + } +} + export class CodeGeneratorRequest extends jspb.Message { clearFileToGenerateList(): void; getFileToGenerateList(): Array; @@ -53,16 +62,25 @@ export class CodeGeneratorRequest extends jspb.Message { getCompilerVersion(): Version; setCompilerVersion(value: Version): void; - static deserializeBinary(bytes: Uint8Array): CodeGeneratorRequest; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: CodeGeneratorRequest): {}; + toObject(includeInstance?: boolean): CodeGeneratorRequest.AsObject; + static toObject(includeInstance: boolean, msg: CodeGeneratorRequest): CodeGeneratorRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: CodeGeneratorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CodeGeneratorRequest; static deserializeBinaryFromReader(message: CodeGeneratorRequest, reader: jspb.BinaryReader): CodeGeneratorRequest; } +export namespace CodeGeneratorRequest { + export type AsObject = { + fileToGenerateList: Array, + parameter: string, + protoFileList: Array, + compilerVersion: Version.AsObject, + } +} + export class CodeGeneratorResponse extends jspb.Message { hasError(): boolean; clearError(): void; @@ -74,40 +92,54 @@ export class CodeGeneratorResponse extends jspb.Message { setFileList(value: Array): void; addFile(value?: CodeGeneratorResponse.File, index?: number): void; - static deserializeBinary(bytes: Uint8Array): CodeGeneratorResponse; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: CodeGeneratorResponse): {}; + toObject(includeInstance?: boolean): CodeGeneratorResponse.AsObject; + static toObject(includeInstance: boolean, msg: CodeGeneratorResponse): CodeGeneratorResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: CodeGeneratorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CodeGeneratorResponse; static deserializeBinaryFromReader(message: CodeGeneratorResponse, reader: jspb.BinaryReader): CodeGeneratorResponse; } export namespace CodeGeneratorResponse { + export type AsObject = { + error: string, + fileList: Array, + } + export class File extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string; - setName(value: string): void; + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; - hasInsertionPoint(): boolean; - clearInsertionPoint(): void; - getInsertionPoint(): string; - setInsertionPoint(value: string): void; + hasInsertionPoint(): boolean; + clearInsertionPoint(): void; + getInsertionPoint(): string; + setInsertionPoint(value: string): void; - hasContent(): boolean; - clearContent(): void; - getContent(): string; - setContent(value: string): void; + hasContent(): boolean; + clearContent(): void; + getContent(): string; + setContent(value: string): void; - static deserializeBinary(bytes: Uint8Array): File; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: File): {}; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: File, writer: jspb.BinaryWriter): void; - static deserializeBinaryFromReader(message: File, reader: jspb.BinaryReader): File; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): File.AsObject; + static toObject(includeInstance: boolean, msg: File): File.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: File, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): File; + static deserializeBinaryFromReader(message: File, reader: jspb.BinaryReader): File; + } + + export namespace File { + export type AsObject = { + name: string, + insertionPoint: string, + content: string, + } } } + diff --git a/google-protobuf/google/protobuf/descriptor_pb.d.ts b/google-protobuf/google/protobuf/descriptor_pb.d.ts index d5fe011e9f..294cbab1dc 100644 --- a/google-protobuf/google/protobuf/descriptor_pb.d.ts +++ b/google-protobuf/google/protobuf/descriptor_pb.d.ts @@ -7,8 +7,8 @@ export class FileDescriptorSet extends jspb.Message { addFile(value?: FileDescriptorProto, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: FileDescriptorSet): {}; + toObject(includeInstance?: boolean): FileDescriptorSet.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorSet): FileDescriptorSet.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: FileDescriptorSet, writer: jspb.BinaryWriter): void; @@ -16,6 +16,12 @@ export class FileDescriptorSet extends jspb.Message { static deserializeBinaryFromReader(message: FileDescriptorSet, reader: jspb.BinaryReader): FileDescriptorSet; } +export namespace FileDescriptorSet { + export type AsObject = { + fileList: Array, + } +} + export class FileDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; @@ -78,8 +84,8 @@ export class FileDescriptorProto extends jspb.Message { setSyntax(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: FileDescriptorProto): {}; + toObject(includeInstance?: boolean): FileDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorProto): FileDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: FileDescriptorProto, writer: jspb.BinaryWriter): void; @@ -87,6 +93,23 @@ export class FileDescriptorProto extends jspb.Message { static deserializeBinaryFromReader(message: FileDescriptorProto, reader: jspb.BinaryReader): FileDescriptorProto; } +export namespace FileDescriptorProto { + export type AsObject = { + name: string, + package: string, + dependencyList: Array, + publicDependencyList: Array, + weakDependencyList: Array, + messageTypeList: Array, + enumTypeList: Array, + serviceList: Array, + extensionList: Array, + options: FileOptions.AsObject, + sourceCodeInfo: SourceCodeInfo.AsObject, + syntax: string, + } +} + export class DescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; @@ -139,8 +162,8 @@ export class DescriptorProto extends jspb.Message { addReservedName(value: string, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: DescriptorProto): {}; + toObject(includeInstance?: boolean): DescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: DescriptorProto): DescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: DescriptorProto, writer: jspb.BinaryWriter): void; @@ -149,6 +172,19 @@ export class DescriptorProto extends jspb.Message { } export namespace DescriptorProto { + export type AsObject = { + name: string, + fieldList: Array, + extensionList: Array, + nestedTypeList: Array, + enumTypeList: Array, + extensionRangeList: Array, + oneofDeclList: Array, + options: MessageOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + export class ExtensionRange extends jspb.Message { hasStart(): boolean; clearStart(): void; @@ -161,8 +197,8 @@ export namespace DescriptorProto { setEnd(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: ExtensionRange): {}; + toObject(includeInstance?: boolean): ExtensionRange.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRange): ExtensionRange.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: ExtensionRange, writer: jspb.BinaryWriter): void; @@ -170,6 +206,13 @@ export namespace DescriptorProto { static deserializeBinaryFromReader(message: ExtensionRange, reader: jspb.BinaryReader): ExtensionRange; } + export namespace ExtensionRange { + export type AsObject = { + start: number, + end: number, + } + } + export class ReservedRange extends jspb.Message { hasStart(): boolean; clearStart(): void; @@ -182,14 +225,21 @@ export namespace DescriptorProto { setEnd(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: ReservedRange): {}; + toObject(includeInstance?: boolean): ReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: ReservedRange): ReservedRange.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: ReservedRange, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ReservedRange; static deserializeBinaryFromReader(message: ReservedRange, reader: jspb.BinaryReader): ReservedRange; } + + export namespace ReservedRange { + export type AsObject = { + start: number, + end: number, + } + } } export class FieldDescriptorProto extends jspb.Message { @@ -244,8 +294,8 @@ export class FieldDescriptorProto extends jspb.Message { setOptions(value: FieldOptions): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: FieldDescriptorProto): {}; + toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FieldDescriptorProto): FieldDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: FieldDescriptorProto, writer: jspb.BinaryWriter): void; @@ -254,6 +304,19 @@ export class FieldDescriptorProto extends jspb.Message { } export namespace FieldDescriptorProto { + export type AsObject = { + name: string, + number: number, + label: FieldDescriptorProto.Label, + type: FieldDescriptorProto.Type, + typeName: string, + extendee: string, + defaultValue: string, + oneofIndex: number, + jsonName: string, + options: FieldOptions.AsObject, + } + export enum Type { TYPE_DOUBLE = 1, TYPE_FLOAT = 2, @@ -293,8 +356,8 @@ export class OneofDescriptorProto extends jspb.Message { setOptions(value: OneofOptions): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: OneofDescriptorProto): {}; + toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: OneofDescriptorProto): OneofDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: OneofDescriptorProto, writer: jspb.BinaryWriter): void; @@ -302,6 +365,13 @@ export class OneofDescriptorProto extends jspb.Message { static deserializeBinaryFromReader(message: OneofDescriptorProto, reader: jspb.BinaryReader): OneofDescriptorProto; } +export namespace OneofDescriptorProto { + export type AsObject = { + name: string, + options: OneofOptions.AsObject, + } +} + export class EnumDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; @@ -319,8 +389,8 @@ export class EnumDescriptorProto extends jspb.Message { setOptions(value: EnumOptions): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: EnumDescriptorProto): {}; + toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumDescriptorProto): EnumDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: EnumDescriptorProto, writer: jspb.BinaryWriter): void; @@ -328,6 +398,14 @@ export class EnumDescriptorProto extends jspb.Message { static deserializeBinaryFromReader(message: EnumDescriptorProto, reader: jspb.BinaryReader): EnumDescriptorProto; } +export namespace EnumDescriptorProto { + export type AsObject = { + name: string, + valueList: Array, + options: EnumOptions.AsObject, + } +} + export class EnumValueDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; @@ -345,8 +423,8 @@ export class EnumValueDescriptorProto extends jspb.Message { setOptions(value: EnumValueOptions): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): {}; + toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): EnumValueDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: EnumValueDescriptorProto, writer: jspb.BinaryWriter): void; @@ -354,6 +432,14 @@ export class EnumValueDescriptorProto extends jspb.Message { static deserializeBinaryFromReader(message: EnumValueDescriptorProto, reader: jspb.BinaryReader): EnumValueDescriptorProto; } +export namespace EnumValueDescriptorProto { + export type AsObject = { + name: string, + number: number, + options: EnumValueOptions.AsObject, + } +} + export class ServiceDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; @@ -371,8 +457,8 @@ export class ServiceDescriptorProto extends jspb.Message { setOptions(value: ServiceOptions): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): {}; + toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): ServiceDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: ServiceDescriptorProto, writer: jspb.BinaryWriter): void; @@ -380,6 +466,14 @@ export class ServiceDescriptorProto extends jspb.Message { static deserializeBinaryFromReader(message: ServiceDescriptorProto, reader: jspb.BinaryReader): ServiceDescriptorProto; } +export namespace ServiceDescriptorProto { + export type AsObject = { + name: string, + methodList: Array, + options: ServiceOptions.AsObject, + } +} + export class MethodDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; @@ -412,8 +506,8 @@ export class MethodDescriptorProto extends jspb.Message { setServerStreaming(value: boolean): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: MethodDescriptorProto): {}; + toObject(includeInstance?: boolean): MethodDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: MethodDescriptorProto): MethodDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: MethodDescriptorProto, writer: jspb.BinaryWriter): void; @@ -421,6 +515,17 @@ export class MethodDescriptorProto extends jspb.Message { static deserializeBinaryFromReader(message: MethodDescriptorProto, reader: jspb.BinaryReader): MethodDescriptorProto; } +export namespace MethodDescriptorProto { + export type AsObject = { + name: string, + inputType: string, + outputType: string, + options: MethodOptions.AsObject, + clientStreaming: boolean, + serverStreaming: boolean, + } +} + export class FileOptions extends jspb.Message { hasJavaPackage(): boolean; clearJavaPackage(): void; @@ -503,8 +608,8 @@ export class FileOptions extends jspb.Message { addUninterpretedOption(value?: UninterpretedOption, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: FileOptions): {}; + toObject(includeInstance?: boolean): FileOptions.AsObject; + static toObject(includeInstance: boolean, msg: FileOptions): FileOptions.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: FileOptions, writer: jspb.BinaryWriter): void; @@ -513,6 +618,25 @@ export class FileOptions extends jspb.Message { } export namespace FileOptions { + export type AsObject = { + javaPackage: string, + javaOuterClassname: string, + javaMultipleFiles: boolean, + javaGenerateEqualsAndHash: boolean, + javaStringCheckUtf8: boolean, + optimizeFor: FileOptions.OptimizeMode, + goPackage: string, + ccGenericServices: boolean, + javaGenericServices: boolean, + pyGenericServices: boolean, + deprecated: boolean, + ccEnableArenas: boolean, + objcClassPrefix: string, + csharpNamespace: string, + swiftPrefix: string, + uninterpretedOptionList: Array, + } + export enum OptimizeMode { SPEED = 1, CODE_SIZE = 2, @@ -547,8 +671,8 @@ export class MessageOptions extends jspb.Message { addUninterpretedOption(value?: UninterpretedOption, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: MessageOptions): {}; + toObject(includeInstance?: boolean): MessageOptions.AsObject; + static toObject(includeInstance: boolean, msg: MessageOptions): MessageOptions.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: MessageOptions, writer: jspb.BinaryWriter): void; @@ -556,6 +680,16 @@ export class MessageOptions extends jspb.Message { static deserializeBinaryFromReader(message: MessageOptions, reader: jspb.BinaryReader): MessageOptions; } +export namespace MessageOptions { + export type AsObject = { + messageSetWireFormat: boolean, + noStandardDescriptorAccessor: boolean, + deprecated: boolean, + mapEntry: boolean, + uninterpretedOptionList: Array, + } +} + export class FieldOptions extends jspb.Message { hasCtype(): boolean; clearCtype(): void; @@ -593,8 +727,8 @@ export class FieldOptions extends jspb.Message { addUninterpretedOption(value?: UninterpretedOption, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: FieldOptions): {}; + toObject(includeInstance?: boolean): FieldOptions.AsObject; + static toObject(includeInstance: boolean, msg: FieldOptions): FieldOptions.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: FieldOptions, writer: jspb.BinaryWriter): void; @@ -603,6 +737,16 @@ export class FieldOptions extends jspb.Message { } export namespace FieldOptions { + export type AsObject = { + ctype: FieldOptions.CType, + packed: boolean, + jstype: FieldOptions.JSType, + lazy: boolean, + deprecated: boolean, + weak: boolean, + uninterpretedOptionList: Array, + } + export enum CType { STRING = 0, CORD = 1, @@ -622,8 +766,8 @@ export class OneofOptions extends jspb.Message { addUninterpretedOption(value?: UninterpretedOption, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: OneofOptions): {}; + toObject(includeInstance?: boolean): OneofOptions.AsObject; + static toObject(includeInstance: boolean, msg: OneofOptions): OneofOptions.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: OneofOptions, writer: jspb.BinaryWriter): void; @@ -631,6 +775,12 @@ export class OneofOptions extends jspb.Message { static deserializeBinaryFromReader(message: OneofOptions, reader: jspb.BinaryReader): OneofOptions; } +export namespace OneofOptions { + export type AsObject = { + uninterpretedOptionList: Array, + } +} + export class EnumOptions extends jspb.Message { hasAllowAlias(): boolean; clearAllowAlias(): void; @@ -648,8 +798,8 @@ export class EnumOptions extends jspb.Message { addUninterpretedOption(value?: UninterpretedOption, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: EnumOptions): {}; + toObject(includeInstance?: boolean): EnumOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumOptions): EnumOptions.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: EnumOptions, writer: jspb.BinaryWriter): void; @@ -657,6 +807,14 @@ export class EnumOptions extends jspb.Message { static deserializeBinaryFromReader(message: EnumOptions, reader: jspb.BinaryReader): EnumOptions; } +export namespace EnumOptions { + export type AsObject = { + allowAlias: boolean, + deprecated: boolean, + uninterpretedOptionList: Array, + } +} + export class EnumValueOptions extends jspb.Message { hasDeprecated(): boolean; clearDeprecated(): void; @@ -669,8 +827,8 @@ export class EnumValueOptions extends jspb.Message { addUninterpretedOption(value?: UninterpretedOption, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: EnumValueOptions): {}; + toObject(includeInstance?: boolean): EnumValueOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueOptions): EnumValueOptions.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: EnumValueOptions, writer: jspb.BinaryWriter): void; @@ -678,6 +836,13 @@ export class EnumValueOptions extends jspb.Message { static deserializeBinaryFromReader(message: EnumValueOptions, reader: jspb.BinaryReader): EnumValueOptions; } +export namespace EnumValueOptions { + export type AsObject = { + deprecated: boolean, + uninterpretedOptionList: Array, + } +} + export class ServiceOptions extends jspb.Message { hasDeprecated(): boolean; clearDeprecated(): void; @@ -690,8 +855,8 @@ export class ServiceOptions extends jspb.Message { addUninterpretedOption(value?: UninterpretedOption, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: ServiceOptions): {}; + toObject(includeInstance?: boolean): ServiceOptions.AsObject; + static toObject(includeInstance: boolean, msg: ServiceOptions): ServiceOptions.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: ServiceOptions, writer: jspb.BinaryWriter): void; @@ -699,6 +864,13 @@ export class ServiceOptions extends jspb.Message { static deserializeBinaryFromReader(message: ServiceOptions, reader: jspb.BinaryReader): ServiceOptions; } +export namespace ServiceOptions { + export type AsObject = { + deprecated: boolean, + uninterpretedOptionList: Array, + } +} + export class MethodOptions extends jspb.Message { hasDeprecated(): boolean; clearDeprecated(): void; @@ -716,8 +888,8 @@ export class MethodOptions extends jspb.Message { addUninterpretedOption(value?: UninterpretedOption, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: MethodOptions): {}; + toObject(includeInstance?: boolean): MethodOptions.AsObject; + static toObject(includeInstance: boolean, msg: MethodOptions): MethodOptions.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: MethodOptions, writer: jspb.BinaryWriter): void; @@ -726,6 +898,12 @@ export class MethodOptions extends jspb.Message { } export namespace MethodOptions { + export type AsObject = { + deprecated: boolean, + idempotencyLevel: MethodOptions.IdempotencyLevel, + uninterpretedOptionList: Array, + } + export enum IdempotencyLevel { IDEMPOTENCY_UNKNOWN = 0, NO_SIDE_EFFECTS = 1, @@ -772,8 +950,8 @@ export class UninterpretedOption extends jspb.Message { setAggregateValue(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: UninterpretedOption): {}; + toObject(includeInstance?: boolean): UninterpretedOption.AsObject; + static toObject(includeInstance: boolean, msg: UninterpretedOption): UninterpretedOption.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: UninterpretedOption, writer: jspb.BinaryWriter): void; @@ -782,6 +960,16 @@ export class UninterpretedOption extends jspb.Message { } export namespace UninterpretedOption { + export type AsObject = { + nameList: Array, + identifierValue: string, + positiveIntValue: number, + negativeIntValue: number, + doubleValue: number, + stringValue: Uint8Array | string, + aggregateValue: string, + } + export class NamePart extends jspb.Message { hasNamePart(): boolean; clearNamePart(): void; @@ -794,14 +982,21 @@ export namespace UninterpretedOption { setIsExtension(value: boolean): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: NamePart): {}; + toObject(includeInstance?: boolean): NamePart.AsObject; + static toObject(includeInstance: boolean, msg: NamePart): NamePart.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: NamePart, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): NamePart; static deserializeBinaryFromReader(message: NamePart, reader: jspb.BinaryReader): NamePart; } + + export namespace NamePart { + export type AsObject = { + namePart: string, + isExtension: boolean, + } + } } export class SourceCodeInfo extends jspb.Message { @@ -811,8 +1006,8 @@ export class SourceCodeInfo extends jspb.Message { addLocation(value?: SourceCodeInfo.Location, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: SourceCodeInfo): {}; + toObject(includeInstance?: boolean): SourceCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceCodeInfo): SourceCodeInfo.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: SourceCodeInfo, writer: jspb.BinaryWriter): void; @@ -821,6 +1016,10 @@ export class SourceCodeInfo extends jspb.Message { } export namespace SourceCodeInfo { + export type AsObject = { + locationList: Array, + } + export class Location extends jspb.Message { clearPathList(): void; getPathList(): Array; @@ -848,14 +1047,24 @@ export namespace SourceCodeInfo { addLeadingDetachedComments(value: string, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Location): {}; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Location; static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; } + + export namespace Location { + export type AsObject = { + pathList: Array, + spanList: Array, + leadingComments: string, + trailingComments: string, + leadingDetachedCommentsList: Array, + } + } } export class GeneratedCodeInfo extends jspb.Message { @@ -865,8 +1074,8 @@ export class GeneratedCodeInfo extends jspb.Message { addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): {}; + toObject(includeInstance?: boolean): GeneratedCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): GeneratedCodeInfo.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: GeneratedCodeInfo, writer: jspb.BinaryWriter): void; @@ -875,6 +1084,10 @@ export class GeneratedCodeInfo extends jspb.Message { } export namespace GeneratedCodeInfo { + export type AsObject = { + annotationList: Array, + } + export class Annotation extends jspb.Message { clearPathList(): void; getPathList(): Array; @@ -897,12 +1110,22 @@ export namespace GeneratedCodeInfo { setEnd(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Annotation): {}; + toObject(includeInstance?: boolean): Annotation.AsObject; + static toObject(includeInstance: boolean, msg: Annotation): Annotation.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Annotation, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Annotation; static deserializeBinaryFromReader(message: Annotation, reader: jspb.BinaryReader): Annotation; } + + export namespace Annotation { + export type AsObject = { + pathList: Array, + sourceFile: string, + begin: number, + end: number, + } + } } + diff --git a/google-protobuf/google/protobuf/duration_pb.d.ts b/google-protobuf/google/protobuf/duration_pb.d.ts index 1f2c6003d5..29b39ae965 100644 --- a/google-protobuf/google/protobuf/duration_pb.d.ts +++ b/google-protobuf/google/protobuf/duration_pb.d.ts @@ -8,11 +8,19 @@ export class Duration extends jspb.Message { setNanos(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Duration): {}; + toObject(includeInstance?: boolean): Duration.AsObject; + static toObject(includeInstance: boolean, msg: Duration): Duration.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Duration, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Duration; static deserializeBinaryFromReader(message: Duration, reader: jspb.BinaryReader): Duration; } + +export namespace Duration { + export type AsObject = { + seconds: number, + nanos: number, + } +} + diff --git a/google-protobuf/google/protobuf/empty_pb.d.ts b/google-protobuf/google/protobuf/empty_pb.d.ts index 1f06a3136c..69de4641d9 100644 --- a/google-protobuf/google/protobuf/empty_pb.d.ts +++ b/google-protobuf/google/protobuf/empty_pb.d.ts @@ -2,11 +2,17 @@ import * as jspb from "../../index"; export class Empty extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Empty): {}; + toObject(includeInstance?: boolean): Empty.AsObject; + static toObject(includeInstance: boolean, msg: Empty): Empty.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Empty, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Empty; static deserializeBinaryFromReader(message: Empty, reader: jspb.BinaryReader): Empty; } + +export namespace Empty { + export type AsObject = { + } +} + diff --git a/google-protobuf/google/protobuf/field_mask_pb.d.ts b/google-protobuf/google/protobuf/field_mask_pb.d.ts index a639513909..d0c4caf2aa 100644 --- a/google-protobuf/google/protobuf/field_mask_pb.d.ts +++ b/google-protobuf/google/protobuf/field_mask_pb.d.ts @@ -7,11 +7,18 @@ export class FieldMask extends jspb.Message { addPaths(value: string, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: FieldMask): {}; + toObject(includeInstance?: boolean): FieldMask.AsObject; + static toObject(includeInstance: boolean, msg: FieldMask): FieldMask.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: FieldMask, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): FieldMask; static deserializeBinaryFromReader(message: FieldMask, reader: jspb.BinaryReader): FieldMask; } + +export namespace FieldMask { + export type AsObject = { + pathsList: Array, + } +} + diff --git a/google-protobuf/google/protobuf/source_context_pb.d.ts b/google-protobuf/google/protobuf/source_context_pb.d.ts index 03d8edec38..934b9a2636 100644 --- a/google-protobuf/google/protobuf/source_context_pb.d.ts +++ b/google-protobuf/google/protobuf/source_context_pb.d.ts @@ -5,11 +5,18 @@ export class SourceContext extends jspb.Message { setFileName(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: SourceContext): {}; + toObject(includeInstance?: boolean): SourceContext.AsObject; + static toObject(includeInstance: boolean, msg: SourceContext): SourceContext.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: SourceContext, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): SourceContext; static deserializeBinaryFromReader(message: SourceContext, reader: jspb.BinaryReader): SourceContext; } + +export namespace SourceContext { + export type AsObject = { + fileName: string, + } +} + diff --git a/google-protobuf/google/protobuf/struct_pb.d.ts b/google-protobuf/google/protobuf/struct_pb.d.ts index 0391801a70..46c28ad1df 100644 --- a/google-protobuf/google/protobuf/struct_pb.d.ts +++ b/google-protobuf/google/protobuf/struct_pb.d.ts @@ -8,8 +8,8 @@ export class Struct extends jspb.Message { static fromJavaScript(value: {[key: string]: JavaScriptValue}): Struct; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Struct): {}; + toObject(includeInstance?: boolean): Struct.AsObject; + static toObject(includeInstance: boolean, msg: Struct): Struct.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Struct, writer: jspb.BinaryWriter): void; @@ -17,6 +17,12 @@ export class Struct extends jspb.Message { static deserializeBinaryFromReader(message: Struct, reader: jspb.BinaryReader): Struct; } +export namespace Struct { + export type AsObject = { + fieldsMap: Array<[string, Value.AsObject]>, + } +} + export class Value extends jspb.Message { hasNullValue(): boolean; clearNullValue(): void; @@ -53,17 +59,26 @@ export class Value extends jspb.Message { toJavaScript(): JavaScriptValue; static fromJavaScript(value: JavaScriptValue): Value; - static deserializeBinary(bytes: Uint8Array): Value; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Value): {}; + toObject(includeInstance?: boolean): Value.AsObject; + static toObject(includeInstance: boolean, msg: Value): Value.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Value; static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; } export namespace Value { + export type AsObject = { + nullValue: NullValue, + numberValue: number, + stringValue: string, + boolValue: boolean, + structValue: Struct.AsObject, + listValue: ListValue.AsObject, + } + export enum KindCase { KIND_NOT_SET = 0, NULL_VALUE = 1, @@ -84,16 +99,22 @@ export class ListValue extends jspb.Message { toJavaScript(): Array; static fromJavaScript(value: Array): ListValue; - static deserializeBinary(bytes: Uint8Array): ListValue; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: ListValue): {}; + toObject(includeInstance?: boolean): ListValue.AsObject; + static toObject(includeInstance: boolean, msg: ListValue): ListValue.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: ListValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListValue; static deserializeBinaryFromReader(message: ListValue, reader: jspb.BinaryReader): ListValue; } +export namespace ListValue { + export type AsObject = { + valuesList: Array, + } +} + export enum NullValue { NULL_VALUE = 0, } diff --git a/google-protobuf/google/protobuf/timestamp_pb.d.ts b/google-protobuf/google/protobuf/timestamp_pb.d.ts index 5ddee20d0c..2fadf11ad2 100644 --- a/google-protobuf/google/protobuf/timestamp_pb.d.ts +++ b/google-protobuf/google/protobuf/timestamp_pb.d.ts @@ -11,11 +11,19 @@ export class Timestamp extends jspb.Message { fromDate(date: Date): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Timestamp): {}; + toObject(includeInstance?: boolean): Timestamp.AsObject; + static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Timestamp; static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; } + +export namespace Timestamp { + export type AsObject = { + seconds: number, + nanos: number, + } +} + diff --git a/google-protobuf/google/protobuf/type_pb.d.ts b/google-protobuf/google/protobuf/type_pb.d.ts index 1e857a05a6..186bad8d36 100644 --- a/google-protobuf/google/protobuf/type_pb.d.ts +++ b/google-protobuf/google/protobuf/type_pb.d.ts @@ -30,8 +30,8 @@ export class Type extends jspb.Message { setSyntax(value: Syntax): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Type): {}; + toObject(includeInstance?: boolean): Type.AsObject; + static toObject(includeInstance: boolean, msg: Type): Type.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Type, writer: jspb.BinaryWriter): void; @@ -39,6 +39,17 @@ export class Type extends jspb.Message { static deserializeBinaryFromReader(message: Type, reader: jspb.BinaryReader): Type; } +export namespace Type { + export type AsObject = { + name: string, + fieldsList: Array, + oneofsList: Array, + optionsList: Array, + sourceContext: google_protobuf_source_context_pb.SourceContext.AsObject, + syntax: Syntax, + } +} + export class Field extends jspb.Message { getKind(): Field.Kind; setKind(value: Field.Kind): void; @@ -73,8 +84,8 @@ export class Field extends jspb.Message { setDefaultValue(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Field): {}; + toObject(includeInstance?: boolean): Field.AsObject; + static toObject(includeInstance: boolean, msg: Field): Field.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Field, writer: jspb.BinaryWriter): void; @@ -83,6 +94,19 @@ export class Field extends jspb.Message { } export namespace Field { + export type AsObject = { + kind: Field.Kind, + cardinality: Field.Cardinality, + number: number, + name: string, + typeUrl: string, + oneofIndex: number, + packed: boolean, + optionsList: Array, + jsonName: string, + defaultValue: string, + } + export enum Kind { TYPE_UNKNOWN = 0, TYPE_DOUBLE = 1, @@ -135,8 +159,8 @@ export class Enum extends jspb.Message { setSyntax(value: Syntax): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Enum): {}; + toObject(includeInstance?: boolean): Enum.AsObject; + static toObject(includeInstance: boolean, msg: Enum): Enum.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Enum, writer: jspb.BinaryWriter): void; @@ -144,6 +168,16 @@ export class Enum extends jspb.Message { static deserializeBinaryFromReader(message: Enum, reader: jspb.BinaryReader): Enum; } +export namespace Enum { + export type AsObject = { + name: string, + enumvalueList: Array, + optionsList: Array, + sourceContext: google_protobuf_source_context_pb.SourceContext.AsObject, + syntax: Syntax, + } +} + export class EnumValue extends jspb.Message { getName(): string; setName(value: string): void; @@ -157,8 +191,8 @@ export class EnumValue extends jspb.Message { addOptions(value?: Option, index?: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: EnumValue): {}; + toObject(includeInstance?: boolean): EnumValue.AsObject; + static toObject(includeInstance: boolean, msg: EnumValue): EnumValue.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: EnumValue, writer: jspb.BinaryWriter): void; @@ -166,6 +200,14 @@ export class EnumValue extends jspb.Message { static deserializeBinaryFromReader(message: EnumValue, reader: jspb.BinaryReader): EnumValue; } +export namespace EnumValue { + export type AsObject = { + name: string, + number: number, + optionsList: Array, + } +} + export class Option extends jspb.Message { getName(): string; setName(value: string): void; @@ -176,8 +218,8 @@ export class Option extends jspb.Message { setValue(value: google_protobuf_any_pb.Any): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Option): {}; + toObject(includeInstance?: boolean): Option.AsObject; + static toObject(includeInstance: boolean, msg: Option): Option.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Option, writer: jspb.BinaryWriter): void; @@ -185,6 +227,13 @@ export class Option extends jspb.Message { static deserializeBinaryFromReader(message: Option, reader: jspb.BinaryReader): Option; } +export namespace Option { + export type AsObject = { + name: string, + value: google_protobuf_any_pb.Any.AsObject, + } +} + export enum Syntax { SYNTAX_PROTO2 = 0, SYNTAX_PROTO3 = 1, diff --git a/google-protobuf/google/protobuf/wrappers_pb.d.ts b/google-protobuf/google/protobuf/wrappers_pb.d.ts index aadbcfe151..4843838c60 100644 --- a/google-protobuf/google/protobuf/wrappers_pb.d.ts +++ b/google-protobuf/google/protobuf/wrappers_pb.d.ts @@ -5,8 +5,8 @@ export class DoubleValue extends jspb.Message { setValue(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: DoubleValue): {}; + toObject(includeInstance?: boolean): DoubleValue.AsObject; + static toObject(includeInstance: boolean, msg: DoubleValue): DoubleValue.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: DoubleValue, writer: jspb.BinaryWriter): void; @@ -14,13 +14,19 @@ export class DoubleValue extends jspb.Message { static deserializeBinaryFromReader(message: DoubleValue, reader: jspb.BinaryReader): DoubleValue; } +export namespace DoubleValue { + export type AsObject = { + value: number, + } +} + export class FloatValue extends jspb.Message { getValue(): number; setValue(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: FloatValue): {}; + toObject(includeInstance?: boolean): FloatValue.AsObject; + static toObject(includeInstance: boolean, msg: FloatValue): FloatValue.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: FloatValue, writer: jspb.BinaryWriter): void; @@ -28,13 +34,19 @@ export class FloatValue extends jspb.Message { static deserializeBinaryFromReader(message: FloatValue, reader: jspb.BinaryReader): FloatValue; } +export namespace FloatValue { + export type AsObject = { + value: number, + } +} + export class Int64Value extends jspb.Message { getValue(): number; setValue(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Int64Value): {}; + toObject(includeInstance?: boolean): Int64Value.AsObject; + static toObject(includeInstance: boolean, msg: Int64Value): Int64Value.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Int64Value, writer: jspb.BinaryWriter): void; @@ -42,13 +54,19 @@ export class Int64Value extends jspb.Message { static deserializeBinaryFromReader(message: Int64Value, reader: jspb.BinaryReader): Int64Value; } +export namespace Int64Value { + export type AsObject = { + value: number, + } +} + export class UInt64Value extends jspb.Message { getValue(): number; setValue(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: UInt64Value): {}; + toObject(includeInstance?: boolean): UInt64Value.AsObject; + static toObject(includeInstance: boolean, msg: UInt64Value): UInt64Value.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: UInt64Value, writer: jspb.BinaryWriter): void; @@ -56,13 +74,19 @@ export class UInt64Value extends jspb.Message { static deserializeBinaryFromReader(message: UInt64Value, reader: jspb.BinaryReader): UInt64Value; } +export namespace UInt64Value { + export type AsObject = { + value: number, + } +} + export class Int32Value extends jspb.Message { getValue(): number; setValue(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: Int32Value): {}; + toObject(includeInstance?: boolean): Int32Value.AsObject; + static toObject(includeInstance: boolean, msg: Int32Value): Int32Value.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: Int32Value, writer: jspb.BinaryWriter): void; @@ -70,13 +94,19 @@ export class Int32Value extends jspb.Message { static deserializeBinaryFromReader(message: Int32Value, reader: jspb.BinaryReader): Int32Value; } +export namespace Int32Value { + export type AsObject = { + value: number, + } +} + export class UInt32Value extends jspb.Message { getValue(): number; setValue(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: UInt32Value): {}; + toObject(includeInstance?: boolean): UInt32Value.AsObject; + static toObject(includeInstance: boolean, msg: UInt32Value): UInt32Value.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: UInt32Value, writer: jspb.BinaryWriter): void; @@ -84,13 +114,19 @@ export class UInt32Value extends jspb.Message { static deserializeBinaryFromReader(message: UInt32Value, reader: jspb.BinaryReader): UInt32Value; } +export namespace UInt32Value { + export type AsObject = { + value: number, + } +} + export class BoolValue extends jspb.Message { getValue(): boolean; setValue(value: boolean): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: BoolValue): {}; + toObject(includeInstance?: boolean): BoolValue.AsObject; + static toObject(includeInstance: boolean, msg: BoolValue): BoolValue.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: BoolValue, writer: jspb.BinaryWriter): void; @@ -98,13 +134,19 @@ export class BoolValue extends jspb.Message { static deserializeBinaryFromReader(message: BoolValue, reader: jspb.BinaryReader): BoolValue; } +export namespace BoolValue { + export type AsObject = { + value: boolean, + } +} + export class StringValue extends jspb.Message { getValue(): string; setValue(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: StringValue): {}; + toObject(includeInstance?: boolean): StringValue.AsObject; + static toObject(includeInstance: boolean, msg: StringValue): StringValue.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: StringValue, writer: jspb.BinaryWriter): void; @@ -112,6 +154,12 @@ export class StringValue extends jspb.Message { static deserializeBinaryFromReader(message: StringValue, reader: jspb.BinaryReader): StringValue; } +export namespace StringValue { + export type AsObject = { + value: string, + } +} + export class BytesValue extends jspb.Message { getValue(): Uint8Array | string; getValue_asU8(): Uint8Array; @@ -119,11 +167,18 @@ export class BytesValue extends jspb.Message { setValue(value: Uint8Array | string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): {}; - static toObject(includeInstance: boolean, msg: BytesValue): {}; + toObject(includeInstance?: boolean): BytesValue.AsObject; + static toObject(includeInstance: boolean, msg: BytesValue): BytesValue.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; static serializeBinaryToWriter(message: BytesValue, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): BytesValue; static deserializeBinaryFromReader(message: BytesValue, reader: jspb.BinaryReader): BytesValue; } + +export namespace BytesValue { + export type AsObject = { + value: Uint8Array | string, + } +} + diff --git a/google-protobuf/tsconfig.json b/google-protobuf/tsconfig.json index 269fec20d9..ce43a71c33 100644 --- a/google-protobuf/tsconfig.json +++ b/google-protobuf/tsconfig.json @@ -17,6 +17,18 @@ }, "files": [ "index.d.ts", + "google/protobuf/compiler/plugin_pb.d.ts", + "google/protobuf/any_pb.d.ts", + "google/protobuf/api_pb.d.ts", + "google/protobuf/descriptor_pb.d.ts", + "google/protobuf/duration_pb.d.ts", + "google/protobuf/empty_pb.d.ts", + "google/protobuf/field_mask_pb.d.ts", + "google/protobuf/source_context_pb.d.ts", + "google/protobuf/struct_pb.d.ts", + "google/protobuf/timestamp_pb.d.ts", + "google/protobuf/type_pb.d.ts", + "google/protobuf/wrappers_pb.d.ts", "google-protobuf-tests.ts" ] -} \ No newline at end of file +}