diff --git a/examples/generated/proto/examplecom/annotations_pb.d.ts b/examples/generated/proto/examplecom/annotations_pb.d.ts deleted file mode 100644 index 2c0f3e2d..00000000 --- a/examples/generated/proto/examplecom/annotations_pb.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// package: examplecom -// file: proto/examplecom/annotations.proto - -import * as jspb from "google-protobuf"; - -export class AnnotatedMessage extends jspb.Message { - getMyunit64(): string; - setMyunit64(value: string): void; - - getMyint64(): string; - setMyint64(value: string): void; - - getMyfixed64(): string; - setMyfixed64(value: string): void; - - getMysint64(): string; - setMysint64(value: string): void; - - getMysfixed64(): string; - setMysfixed64(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AnnotatedMessage.AsObject; - static toObject(includeInstance: boolean, msg: AnnotatedMessage): AnnotatedMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AnnotatedMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AnnotatedMessage; - static deserializeBinaryFromReader(message: AnnotatedMessage, reader: jspb.BinaryReader): AnnotatedMessage; -} - -export namespace AnnotatedMessage { - export type AsObject = { - myunit64: string, - myint64: string, - myfixed64: string, - mysint64: string, - mysfixed64: string, - } -} - diff --git a/examples/generated/proto/examplecom/annotations_pb.flow.js b/examples/generated/proto/examplecom/annotations_pb.flow.js new file mode 100644 index 00000000..3f8f4499 --- /dev/null +++ b/examples/generated/proto/examplecom/annotations_pb.flow.js @@ -0,0 +1,40 @@ +// @flow +// package: examplecom +// file: proto/examplecom/annotations.proto + +import * as jspb from "google-protobuf"; + +export class AnnotatedMessage$AsClass extends jspb.Message { + getMyunit64: () => string; + setMyunit64: (value: string) => void; + + getMyint64: () => string; + setMyint64: (value: string) => void; + + getMyfixed64: () => string; + setMyfixed64: (value: string) => void; + + getMysint64: () => string; + setMysint64: (value: string) => void; + + getMysfixed64: () => string; + setMysfixed64: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => AnnotatedMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: AnnotatedMessage$AsClass) => AnnotatedMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: AnnotatedMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => AnnotatedMessage$AsClass; + static deserializeBinaryFromReader: (message: AnnotatedMessage$AsClass, reader: jspb.BinaryReader) => AnnotatedMessage$AsClass; +} + +export type AnnotatedMessage$AsClass$AsObject = { + myunit64: string, + myint64: string, + myfixed64: string, + mysint64: string, + mysfixed64: string, +} + diff --git a/examples/generated/proto/examplecom/empty_message_no_service_pb.d.ts b/examples/generated/proto/examplecom/empty_message_no_service_pb.d.ts deleted file mode 100644 index 6990710b..00000000 --- a/examples/generated/proto/examplecom/empty_message_no_service_pb.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// package: examplecom -// file: proto/examplecom/empty_message_no_service.proto - -import * as jspb from "google-protobuf"; - -export class NoService extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NoService.AsObject; - static toObject(includeInstance: boolean, msg: NoService): NoService.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NoService, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NoService; - static deserializeBinaryFromReader(message: NoService, reader: jspb.BinaryReader): NoService; -} - -export namespace NoService { - export type AsObject = { - } -} - diff --git a/examples/generated/proto/examplecom/empty_message_no_service_pb.flow.js b/examples/generated/proto/examplecom/empty_message_no_service_pb.flow.js new file mode 100644 index 00000000..3bacc40a --- /dev/null +++ b/examples/generated/proto/examplecom/empty_message_no_service_pb.flow.js @@ -0,0 +1,20 @@ +// @flow +// package: examplecom +// file: proto/examplecom/empty_message_no_service.proto + +import * as jspb from "google-protobuf"; + +export class NoService$AsClass extends jspb.Message { + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => NoService$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: NoService$AsClass) => NoService$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: NoService$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => NoService$AsClass; + static deserializeBinaryFromReader: (message: NoService$AsClass, reader: jspb.BinaryReader) => NoService$AsClass; +} + +export type NoService$AsClass$AsObject = { +} + diff --git a/examples/generated/proto/examplecom/enum_message_pb.d.ts b/examples/generated/proto/examplecom/enum_message_pb.d.ts deleted file mode 100644 index c1bc93cc..00000000 --- a/examples/generated/proto/examplecom/enum_message_pb.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -// package: examplecom -// file: proto/examplecom/enum_message.proto - -import * as jspb from "google-protobuf"; -import * as proto_othercom_external_enum_pb from "../../proto/othercom/external_enum_pb"; - -export class EnumMessage extends jspb.Message { - getInternalEnum(): EnumMessage.InternalEnum; - setInternalEnum(value: EnumMessage.InternalEnum): void; - - clearInternalEnumsList(): void; - getInternalEnumsList(): Array; - setInternalEnumsList(value: Array): void; - addInternalEnums(value: EnumMessage.InternalEnum, index?: number): EnumMessage.InternalEnum; - - getExternalEnum(): proto_othercom_external_enum_pb.ExternalEnum; - setExternalEnum(value: proto_othercom_external_enum_pb.ExternalEnum): void; - - clearExternalEnumsList(): void; - getExternalEnumsList(): Array; - setExternalEnumsList(value: Array): void; - addExternalEnums(value: proto_othercom_external_enum_pb.ExternalEnum, index?: number): proto_othercom_external_enum_pb.ExternalEnum; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EnumMessage.AsObject; - static toObject(includeInstance: boolean, msg: EnumMessage): EnumMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EnumMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EnumMessage; - static deserializeBinaryFromReader(message: EnumMessage, reader: jspb.BinaryReader): EnumMessage; -} - -export namespace EnumMessage { - export type AsObject = { - internalEnum: EnumMessage.InternalEnum, - internalEnumsList: Array, - externalEnum: proto_othercom_external_enum_pb.ExternalEnum, - externalEnumsList: Array, - } - - export enum InternalEnum { - DEFAULT = 0, - FIRST = 1, - SECOND = 2, - THIRD = 3, - } -} - diff --git a/examples/generated/proto/examplecom/enum_message_pb.flow.js b/examples/generated/proto/examplecom/enum_message_pb.flow.js new file mode 100644 index 00000000..d84982e6 --- /dev/null +++ b/examples/generated/proto/examplecom/enum_message_pb.flow.js @@ -0,0 +1,55 @@ +// @flow +// package: examplecom +// file: proto/examplecom/enum_message.proto + +import * as jspb from "google-protobuf"; +import * as proto_othercom_external_enum_pb from "../../proto/othercom/external_enum_pb.flow.js"; + +export class EnumMessage$AsClass extends jspb.Message { + getInternalEnum: () => $Values; + setInternalEnum: (value: $Values) => void; + + clearInternalEnumsList: () => void; + getInternalEnumsList: () => Array<$Values>; + setInternalEnumsList: (value: Array<$Values>) => void; + addInternalEnums: (value: $Values, index?: number) => $Values; + + getExternalEnum: () => $Values; + setExternalEnum: (value: $Values) => void; + + clearExternalEnumsList: () => void; + getExternalEnumsList: () => Array<$Values>; + setExternalEnumsList: (value: Array<$Values>) => void; + addExternalEnums: (value: $Values, index?: number) => $Values; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => EnumMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: EnumMessage$AsClass) => EnumMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: EnumMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => EnumMessage$AsClass; + static deserializeBinaryFromReader: (message: EnumMessage$AsClass, reader: jspb.BinaryReader) => EnumMessage$AsClass; +} + +export type EnumMessage$AsClass$AsObject = { + internalEnum: $Values, + internalEnumsList: Array<$Values>, + externalEnum: $Values, + externalEnumsList: Array<$Values>, +} + +export const EnumMessage$AsClass_InternalEnum = Object.freeze({ + DEFAULT: 0, + FIRST: 1, + SECOND: 2, + THIRD: 3, +}) + +export const EnumMessage$AsClass_InternalEnum$ReverseLookUp = Object.freeze({ + "0": "DEFAULT", + "1": "FIRST", + "2": "SECOND", + "3": "THIRD", +}) + diff --git a/examples/generated/proto/examplecom/map_message_pb.d.ts b/examples/generated/proto/examplecom/map_message_pb.d.ts deleted file mode 100644 index 5e74ee8b..00000000 --- a/examples/generated/proto/examplecom/map_message_pb.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// package: examplecom -// file: proto/examplecom/map_message.proto - -import * as jspb from "google-protobuf"; -import * as proto_othercom_external_enum_pb from "../../proto/othercom/external_enum_pb"; -import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb"; - -export class MapMessage extends jspb.Message { - getInternalEnumsMap(): jspb.Map; - clearInternalEnumsMap(): void; - getInternalChildrenMap(): jspb.Map; - clearInternalChildrenMap(): void; - getExternalEnumsMap(): jspb.Map; - clearExternalEnumsMap(): void; - getExternalChildrenMap(): jspb.Map; - clearExternalChildrenMap(): void; - getPrimitiveIntsMap(): jspb.Map; - clearPrimitiveIntsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MapMessage.AsObject; - static toObject(includeInstance: boolean, msg: MapMessage): MapMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MapMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MapMessage; - static deserializeBinaryFromReader(message: MapMessage, reader: jspb.BinaryReader): MapMessage; -} - -export namespace MapMessage { - export type AsObject = { - internalEnumsMap: Array<[number, MapMessage.InternalEnum]>, - internalChildrenMap: Array<[string, MapMessage.InternalChildMessage.AsObject]>, - externalEnumsMap: Array<[number, proto_othercom_external_enum_pb.ExternalEnum]>, - externalChildrenMap: Array<[string, proto_othercom_external_child_message_pb.ExternalChildMessage.AsObject]>, - primitiveIntsMap: Array<[string, number]>, - } - - export class InternalChildMessage extends jspb.Message { - getMyString(): string; - setMyString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InternalChildMessage.AsObject; - static toObject(includeInstance: boolean, msg: InternalChildMessage): InternalChildMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InternalChildMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InternalChildMessage; - static deserializeBinaryFromReader(message: InternalChildMessage, reader: jspb.BinaryReader): InternalChildMessage; - } - - export namespace InternalChildMessage { - export type AsObject = { - myString: string, - } - } - - export enum InternalEnum { - DEFAULT = 0, - FIRST = 1, - SECOND = 2, - } -} - diff --git a/examples/generated/proto/examplecom/map_message_pb.flow.js b/examples/generated/proto/examplecom/map_message_pb.flow.js new file mode 100644 index 00000000..f29ec082 --- /dev/null +++ b/examples/generated/proto/examplecom/map_message_pb.flow.js @@ -0,0 +1,67 @@ +// @flow +// package: examplecom +// file: proto/examplecom/map_message.proto + +import * as jspb from "google-protobuf"; +import * as proto_othercom_external_enum_pb from "../../proto/othercom/external_enum_pb.flow.js"; +import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb.flow.js"; + +export class MapMessage$AsClass extends jspb.Message { + getInternalEnumsMap: () => jspb.Map>; + clearInternalEnumsMap: () => void; + getInternalChildrenMap: () => jspb.Map; + clearInternalChildrenMap: () => void; + getExternalEnumsMap: () => jspb.Map>; + clearExternalEnumsMap: () => void; + getExternalChildrenMap: () => jspb.Map; + clearExternalChildrenMap: () => void; + getPrimitiveIntsMap: () => jspb.Map; + clearPrimitiveIntsMap: () => void; + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => MapMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: MapMessage$AsClass) => MapMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: MapMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => MapMessage$AsClass; + static deserializeBinaryFromReader: (message: MapMessage$AsClass, reader: jspb.BinaryReader) => MapMessage$AsClass; +} + +export type MapMessage$AsClass$AsObject = { + internalEnumsMap: Array<[number, $Values]>, + internalChildrenMap: Array<[string, MapMessage$AsClass_InternalChildMessage$AsClass$AsObject]>, + externalEnumsMap: Array<[number, $Values]>, + externalChildrenMap: Array<[string, proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass$AsObject]>, + primitiveIntsMap: Array<[string, number]>, +} + +export class MapMessage$AsClass_InternalChildMessage$AsClass extends jspb.Message { + getMyString: () => string; + setMyString: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => MapMessage$AsClass_InternalChildMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: MapMessage$AsClass_InternalChildMessage$AsClass) => MapMessage$AsClass_InternalChildMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: MapMessage$AsClass_InternalChildMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => MapMessage$AsClass_InternalChildMessage$AsClass; + static deserializeBinaryFromReader: (message: MapMessage$AsClass_InternalChildMessage$AsClass, reader: jspb.BinaryReader) => MapMessage$AsClass_InternalChildMessage$AsClass; +} + +export type MapMessage$AsClass_InternalChildMessage$AsClass$AsObject = { + myString: string, +} + +export const MapMessage$AsClass_InternalEnum = Object.freeze({ + DEFAULT: 0, + FIRST: 1, + SECOND: 2, +}) + +export const MapMessage$AsClass_InternalEnum$ReverseLookUp = Object.freeze({ + "0": "DEFAULT", + "1": "FIRST", + "2": "SECOND", +}) + diff --git a/examples/generated/proto/examplecom/oneof_message_pb.d.ts b/examples/generated/proto/examplecom/oneof_message_pb.d.ts deleted file mode 100644 index 0a613e00..00000000 --- a/examples/generated/proto/examplecom/oneof_message_pb.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -// package: examplecom -// file: proto/examplecom/oneof_message.proto - -import * as jspb from "google-protobuf"; -import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb"; - -export class OneOfMessage extends jspb.Message { - hasInternalChildMessage(): boolean; - clearInternalChildMessage(): void; - getInternalChildMessage(): OneOfMessage.InternalChildMessage | undefined; - setInternalChildMessage(value?: OneOfMessage.InternalChildMessage): void; - - hasExternalChildMessage(): boolean; - clearExternalChildMessage(): void; - getExternalChildMessage(): proto_othercom_external_child_message_pb.ExternalChildMessage | undefined; - setExternalChildMessage(value?: proto_othercom_external_child_message_pb.ExternalChildMessage): void; - - hasMyString(): boolean; - clearMyString(): void; - getMyString(): string; - setMyString(value: string): void; - - hasMyInt64(): boolean; - clearMyInt64(): void; - getMyInt64(): number; - setMyInt64(value: number): void; - - getGroupCase(): OneOfMessage.GroupCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OneOfMessage.AsObject; - static toObject(includeInstance: boolean, msg: OneOfMessage): OneOfMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OneOfMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OneOfMessage; - static deserializeBinaryFromReader(message: OneOfMessage, reader: jspb.BinaryReader): OneOfMessage; -} - -export namespace OneOfMessage { - export type AsObject = { - internalChildMessage?: OneOfMessage.InternalChildMessage.AsObject, - externalChildMessage?: proto_othercom_external_child_message_pb.ExternalChildMessage.AsObject, - myString: string, - myInt64: number, - } - - export class InternalChildMessage extends jspb.Message { - getMyString(): string; - setMyString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InternalChildMessage.AsObject; - static toObject(includeInstance: boolean, msg: InternalChildMessage): InternalChildMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InternalChildMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InternalChildMessage; - static deserializeBinaryFromReader(message: InternalChildMessage, reader: jspb.BinaryReader): InternalChildMessage; - } - - export namespace InternalChildMessage { - export type AsObject = { - myString: string, - } - } - - export enum GroupCase { - GROUP_NOT_SET = 0, - INTERNAL_CHILD_MESSAGE = 1, - EXTERNAL_CHILD_MESSAGE = 2, - MY_STRING = 3, - MY_INT64 = 4, - } -} - -export class CamelCasedOneOfMessage extends jspb.Message { - hasAnint(): boolean; - clearAnint(): void; - getAnint(): number; - setAnint(value: number): void; - - hasThestring(): boolean; - clearThestring(): void; - getThestring(): string; - setThestring(value: string): void; - - getCamelcasedmessageCase(): CamelCasedOneOfMessage.CamelcasedmessageCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CamelCasedOneOfMessage.AsObject; - static toObject(includeInstance: boolean, msg: CamelCasedOneOfMessage): CamelCasedOneOfMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CamelCasedOneOfMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CamelCasedOneOfMessage; - static deserializeBinaryFromReader(message: CamelCasedOneOfMessage, reader: jspb.BinaryReader): CamelCasedOneOfMessage; -} - -export namespace CamelCasedOneOfMessage { - export type AsObject = { - anint: number, - thestring: string, - } - - export enum CamelcasedmessageCase { - CAMELCASEDMESSAGE_NOT_SET = 0, - ANINT = 1, - THESTRING = 2, - } -} - -export class SnakeCasedOneOfMessage extends jspb.Message { - hasAnint(): boolean; - clearAnint(): void; - getAnint(): number; - setAnint(value: number): void; - - hasThestring(): boolean; - clearThestring(): void; - getThestring(): string; - setThestring(value: string): void; - - getSnakeCasedMessageCase(): SnakeCasedOneOfMessage.SnakeCasedMessageCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SnakeCasedOneOfMessage.AsObject; - static toObject(includeInstance: boolean, msg: SnakeCasedOneOfMessage): SnakeCasedOneOfMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SnakeCasedOneOfMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SnakeCasedOneOfMessage; - static deserializeBinaryFromReader(message: SnakeCasedOneOfMessage, reader: jspb.BinaryReader): SnakeCasedOneOfMessage; -} - -export namespace SnakeCasedOneOfMessage { - export type AsObject = { - anint: number, - thestring: string, - } - - export enum SnakeCasedMessageCase { - SNAKE_CASED_MESSAGE_NOT_SET = 0, - ANINT = 1, - THESTRING = 2, - } -} - diff --git a/examples/generated/proto/examplecom/oneof_message_pb.flow.js b/examples/generated/proto/examplecom/oneof_message_pb.flow.js new file mode 100644 index 00000000..a6d7c1c9 --- /dev/null +++ b/examples/generated/proto/examplecom/oneof_message_pb.flow.js @@ -0,0 +1,138 @@ +// @flow +// package: examplecom +// file: proto/examplecom/oneof_message.proto + +import * as jspb from "google-protobuf"; +import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb.flow.js"; + +export class OneOfMessage$AsClass extends jspb.Message { + hasInternalChildMessage: () => boolean; + clearInternalChildMessage: () => void; + getInternalChildMessage: () => ?OneOfMessage$AsClass_InternalChildMessage$AsClass; + setInternalChildMessage: (value?: OneOfMessage$AsClass_InternalChildMessage$AsClass) => void; + + hasExternalChildMessage: () => boolean; + clearExternalChildMessage: () => void; + getExternalChildMessage: () => ?proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass; + setExternalChildMessage: (value?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass) => void; + + hasMyString: () => boolean; + clearMyString: () => void; + getMyString: () => string; + setMyString: (value: string) => void; + + hasMyInt64: () => boolean; + clearMyInt64: () => void; + getMyInt64: () => number; + setMyInt64: (value: number) => void; + + getGroupCase: () => $Values; + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => OneOfMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: OneOfMessage$AsClass) => OneOfMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: OneOfMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => OneOfMessage$AsClass; + static deserializeBinaryFromReader: (message: OneOfMessage$AsClass, reader: jspb.BinaryReader) => OneOfMessage$AsClass; +} + +export type OneOfMessage$AsClass$AsObject = { + internalChildMessage?: OneOfMessage$AsClass_InternalChildMessage$AsClass$AsObject, + externalChildMessage?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass$AsObject, + myString: string, + myInt64: number, +} + +export class OneOfMessage$AsClass_InternalChildMessage$AsClass extends jspb.Message { + getMyString: () => string; + setMyString: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => OneOfMessage$AsClass_InternalChildMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: OneOfMessage$AsClass_InternalChildMessage$AsClass) => OneOfMessage$AsClass_InternalChildMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: OneOfMessage$AsClass_InternalChildMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => OneOfMessage$AsClass_InternalChildMessage$AsClass; + static deserializeBinaryFromReader: (message: OneOfMessage$AsClass_InternalChildMessage$AsClass, reader: jspb.BinaryReader) => OneOfMessage$AsClass_InternalChildMessage$AsClass; +} + +export type OneOfMessage$AsClass_InternalChildMessage$AsClass$AsObject = { + myString: string, +} + +export const OneOfMessage$AsClass_GroupCase = { + GROUP_NOT_SET: 0, + INTERNAL_CHILD_MESSAGE: 1, + EXTERNAL_CHILD_MESSAGE: 2, + MY_STRING: 3, + MY_INT64: 4, +} + +export class CamelCasedOneOfMessage$AsClass extends jspb.Message { + hasAnint: () => boolean; + clearAnint: () => void; + getAnint: () => number; + setAnint: (value: number) => void; + + hasThestring: () => boolean; + clearThestring: () => void; + getThestring: () => string; + setThestring: (value: string) => void; + + getCamelcasedmessageCase: () => $Values; + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => CamelCasedOneOfMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: CamelCasedOneOfMessage$AsClass) => CamelCasedOneOfMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: CamelCasedOneOfMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => CamelCasedOneOfMessage$AsClass; + static deserializeBinaryFromReader: (message: CamelCasedOneOfMessage$AsClass, reader: jspb.BinaryReader) => CamelCasedOneOfMessage$AsClass; +} + +export type CamelCasedOneOfMessage$AsClass$AsObject = { + anint: number, + thestring: string, +} + +export const CamelCasedOneOfMessage$AsClass_CamelcasedmessageCase = { + CAMELCASEDMESSAGE_NOT_SET: 0, + ANINT: 1, + THESTRING: 2, +} + +export class SnakeCasedOneOfMessage$AsClass extends jspb.Message { + hasAnint: () => boolean; + clearAnint: () => void; + getAnint: () => number; + setAnint: (value: number) => void; + + hasThestring: () => boolean; + clearThestring: () => void; + getThestring: () => string; + setThestring: (value: string) => void; + + getSnakeCasedMessageCase: () => $Values; + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => SnakeCasedOneOfMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: SnakeCasedOneOfMessage$AsClass) => SnakeCasedOneOfMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: SnakeCasedOneOfMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => SnakeCasedOneOfMessage$AsClass; + static deserializeBinaryFromReader: (message: SnakeCasedOneOfMessage$AsClass, reader: jspb.BinaryReader) => SnakeCasedOneOfMessage$AsClass; +} + +export type SnakeCasedOneOfMessage$AsClass$AsObject = { + anint: number, + thestring: string, +} + +export const SnakeCasedOneOfMessage$AsClass_SnakeCasedMessageCase = { + SNAKE_CASED_MESSAGE_NOT_SET: 0, + ANINT: 1, + THESTRING: 2, +} + diff --git a/examples/generated/proto/examplecom/parent_message_v2_pb.d.ts b/examples/generated/proto/examplecom/parent_message_v2_pb.d.ts deleted file mode 100644 index 809372f5..00000000 --- a/examples/generated/proto/examplecom/parent_message_v2_pb.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -// package: examplecom -// file: proto/examplecom/parent_message_v2.proto - -import * as jspb from "google-protobuf"; -import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb"; - -export class ParentMessageV2 extends jspb.Message { - hasInternalChildMessage(): boolean; - clearInternalChildMessage(): void; - getInternalChildMessage(): ParentMessageV2.InternalChildMessage; - setInternalChildMessage(value?: ParentMessageV2.InternalChildMessage): void; - - hasOptInternalChildMessage(): boolean; - clearOptInternalChildMessage(): void; - getOptInternalChildMessage(): ParentMessageV2.InternalChildMessage | undefined; - setOptInternalChildMessage(value?: ParentMessageV2.InternalChildMessage): void; - - clearInternalChildrenList(): void; - getInternalChildrenList(): Array; - setInternalChildrenList(value: Array): void; - addInternalChildren(value?: ParentMessageV2.InternalChildMessage, index?: number): ParentMessageV2.InternalChildMessage; - - hasExternalChildMessage(): boolean; - clearExternalChildMessage(): void; - getExternalChildMessage(): proto_othercom_external_child_message_pb.ExternalChildMessage; - setExternalChildMessage(value?: proto_othercom_external_child_message_pb.ExternalChildMessage): void; - - hasOptExternalChildMessage(): boolean; - clearOptExternalChildMessage(): void; - getOptExternalChildMessage(): proto_othercom_external_child_message_pb.ExternalChildMessage | undefined; - setOptExternalChildMessage(value?: proto_othercom_external_child_message_pb.ExternalChildMessage): void; - - clearExternalChildrenList(): void; - getExternalChildrenList(): Array; - setExternalChildrenList(value: Array): void; - addExternalChildren(value?: proto_othercom_external_child_message_pb.ExternalChildMessage, index?: number): proto_othercom_external_child_message_pb.ExternalChildMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ParentMessageV2.AsObject; - static toObject(includeInstance: boolean, msg: ParentMessageV2): ParentMessageV2.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ParentMessageV2, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ParentMessageV2; - static deserializeBinaryFromReader(message: ParentMessageV2, reader: jspb.BinaryReader): ParentMessageV2; -} - -export namespace ParentMessageV2 { - export type AsObject = { - internalChildMessage: ParentMessageV2.InternalChildMessage.AsObject, - optInternalChildMessage?: ParentMessageV2.InternalChildMessage.AsObject, - internalChildrenList: Array, - externalChildMessage: proto_othercom_external_child_message_pb.ExternalChildMessage.AsObject, - optExternalChildMessage?: proto_othercom_external_child_message_pb.ExternalChildMessage.AsObject, - externalChildrenList: Array, - } - - export class InternalChildMessage extends jspb.Message { - hasMyString(): boolean; - clearMyString(): void; - getMyString(): string | undefined; - setMyString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InternalChildMessage.AsObject; - static toObject(includeInstance: boolean, msg: InternalChildMessage): InternalChildMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InternalChildMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InternalChildMessage; - static deserializeBinaryFromReader(message: InternalChildMessage, reader: jspb.BinaryReader): InternalChildMessage; - } - - export namespace InternalChildMessage { - export type AsObject = { - myString?: string, - } - } -} - diff --git a/examples/generated/proto/examplecom/parent_message_v2_pb.flow.js b/examples/generated/proto/examplecom/parent_message_v2_pb.flow.js new file mode 100644 index 00000000..128d0359 --- /dev/null +++ b/examples/generated/proto/examplecom/parent_message_v2_pb.flow.js @@ -0,0 +1,77 @@ +// @flow +// package: examplecom +// file: proto/examplecom/parent_message_v2.proto + +import * as jspb from "google-protobuf"; +import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb.flow.js"; + +export class ParentMessageV2$AsClass extends jspb.Message { + hasInternalChildMessage: () => boolean; + clearInternalChildMessage: () => void; + getInternalChildMessage: () => ParentMessageV2$AsClass_InternalChildMessage$AsClass; + setInternalChildMessage: (value?: ParentMessageV2$AsClass_InternalChildMessage$AsClass) => void; + + hasOptInternalChildMessage: () => boolean; + clearOptInternalChildMessage: () => void; + getOptInternalChildMessage: () => ?ParentMessageV2$AsClass_InternalChildMessage$AsClass; + setOptInternalChildMessage: (value?: ParentMessageV2$AsClass_InternalChildMessage$AsClass) => void; + + clearInternalChildrenList: () => void; + getInternalChildrenList: () => Array; + setInternalChildrenList: (value: Array) => void; + addInternalChildren: (value?: ParentMessageV2$AsClass_InternalChildMessage$AsClass, index?: number) => ParentMessageV2$AsClass_InternalChildMessage$AsClass; + + hasExternalChildMessage: () => boolean; + clearExternalChildMessage: () => void; + getExternalChildMessage: () => proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass; + setExternalChildMessage: (value?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass) => void; + + hasOptExternalChildMessage: () => boolean; + clearOptExternalChildMessage: () => void; + getOptExternalChildMessage: () => ?proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass; + setOptExternalChildMessage: (value?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass) => void; + + clearExternalChildrenList: () => void; + getExternalChildrenList: () => Array; + setExternalChildrenList: (value: Array) => void; + addExternalChildren: (value?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass, index?: number) => proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => ParentMessageV2$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: ParentMessageV2$AsClass) => ParentMessageV2$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: ParentMessageV2$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => ParentMessageV2$AsClass; + static deserializeBinaryFromReader: (message: ParentMessageV2$AsClass, reader: jspb.BinaryReader) => ParentMessageV2$AsClass; +} + +export type ParentMessageV2$AsClass$AsObject = { + internalChildMessage: ParentMessageV2$AsClass_InternalChildMessage$AsClass$AsObject, + optInternalChildMessage?: ParentMessageV2$AsClass_InternalChildMessage$AsClass$AsObject, + internalChildrenList: Array, + externalChildMessage: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass$AsObject, + optExternalChildMessage?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass$AsObject, + externalChildrenList: Array, +} + +export class ParentMessageV2$AsClass_InternalChildMessage$AsClass extends jspb.Message { + hasMyString: () => boolean; + clearMyString: () => void; + getMyString: () => ?string; + setMyString: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => ParentMessageV2$AsClass_InternalChildMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: ParentMessageV2$AsClass_InternalChildMessage$AsClass) => ParentMessageV2$AsClass_InternalChildMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: ParentMessageV2$AsClass_InternalChildMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => ParentMessageV2$AsClass_InternalChildMessage$AsClass; + static deserializeBinaryFromReader: (message: ParentMessageV2$AsClass_InternalChildMessage$AsClass, reader: jspb.BinaryReader) => ParentMessageV2$AsClass_InternalChildMessage$AsClass; +} + +export type ParentMessageV2$AsClass_InternalChildMessage$AsClass$AsObject = { + myString?: string, +} + diff --git a/examples/generated/proto/examplecom/parent_message_v3_pb.d.ts b/examples/generated/proto/examplecom/parent_message_v3_pb.d.ts deleted file mode 100644 index 8aa18ea7..00000000 --- a/examples/generated/proto/examplecom/parent_message_v3_pb.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -// package: examplecom -// file: proto/examplecom/parent_message_v3.proto - -import * as jspb from "google-protobuf"; -import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb"; - -export class ParentMessageV3 extends jspb.Message { - hasInternalChildMessage(): boolean; - clearInternalChildMessage(): void; - getInternalChildMessage(): ParentMessageV3.InternalChildMessage | undefined; - setInternalChildMessage(value?: ParentMessageV3.InternalChildMessage): void; - - clearInternalChildrenList(): void; - getInternalChildrenList(): Array; - setInternalChildrenList(value: Array): void; - addInternalChildren(value?: ParentMessageV3.InternalChildMessage, index?: number): ParentMessageV3.InternalChildMessage; - - hasExternalChildMessage(): boolean; - clearExternalChildMessage(): void; - getExternalChildMessage(): proto_othercom_external_child_message_pb.ExternalChildMessage | undefined; - setExternalChildMessage(value?: proto_othercom_external_child_message_pb.ExternalChildMessage): void; - - clearExternalChildrenList(): void; - getExternalChildrenList(): Array; - setExternalChildrenList(value: Array): void; - addExternalChildren(value?: proto_othercom_external_child_message_pb.ExternalChildMessage, index?: number): proto_othercom_external_child_message_pb.ExternalChildMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ParentMessageV3.AsObject; - static toObject(includeInstance: boolean, msg: ParentMessageV3): ParentMessageV3.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ParentMessageV3, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ParentMessageV3; - static deserializeBinaryFromReader(message: ParentMessageV3, reader: jspb.BinaryReader): ParentMessageV3; -} - -export namespace ParentMessageV3 { - export type AsObject = { - internalChildMessage?: ParentMessageV3.InternalChildMessage.AsObject, - internalChildrenList: Array, - externalChildMessage?: proto_othercom_external_child_message_pb.ExternalChildMessage.AsObject, - externalChildrenList: Array, - } - - export class InternalChildMessage extends jspb.Message { - getMyString(): string; - setMyString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InternalChildMessage.AsObject; - static toObject(includeInstance: boolean, msg: InternalChildMessage): InternalChildMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InternalChildMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InternalChildMessage; - static deserializeBinaryFromReader(message: InternalChildMessage, reader: jspb.BinaryReader): InternalChildMessage; - } - - export namespace InternalChildMessage { - export type AsObject = { - myString: string, - } - } -} - diff --git a/examples/generated/proto/examplecom/parent_message_v3_pb.flow.js b/examples/generated/proto/examplecom/parent_message_v3_pb.flow.js new file mode 100644 index 00000000..491f96e8 --- /dev/null +++ b/examples/generated/proto/examplecom/parent_message_v3_pb.flow.js @@ -0,0 +1,63 @@ +// @flow +// package: examplecom +// file: proto/examplecom/parent_message_v3.proto + +import * as jspb from "google-protobuf"; +import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb.flow.js"; + +export class ParentMessageV3$AsClass extends jspb.Message { + hasInternalChildMessage: () => boolean; + clearInternalChildMessage: () => void; + getInternalChildMessage: () => ?ParentMessageV3$AsClass_InternalChildMessage$AsClass; + setInternalChildMessage: (value?: ParentMessageV3$AsClass_InternalChildMessage$AsClass) => void; + + clearInternalChildrenList: () => void; + getInternalChildrenList: () => Array; + setInternalChildrenList: (value: Array) => void; + addInternalChildren: (value?: ParentMessageV3$AsClass_InternalChildMessage$AsClass, index?: number) => ParentMessageV3$AsClass_InternalChildMessage$AsClass; + + hasExternalChildMessage: () => boolean; + clearExternalChildMessage: () => void; + getExternalChildMessage: () => ?proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass; + setExternalChildMessage: (value?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass) => void; + + clearExternalChildrenList: () => void; + getExternalChildrenList: () => Array; + setExternalChildrenList: (value: Array) => void; + addExternalChildren: (value?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass, index?: number) => proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => ParentMessageV3$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: ParentMessageV3$AsClass) => ParentMessageV3$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: ParentMessageV3$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => ParentMessageV3$AsClass; + static deserializeBinaryFromReader: (message: ParentMessageV3$AsClass, reader: jspb.BinaryReader) => ParentMessageV3$AsClass; +} + +export type ParentMessageV3$AsClass$AsObject = { + internalChildMessage?: ParentMessageV3$AsClass_InternalChildMessage$AsClass$AsObject, + internalChildrenList: Array, + externalChildMessage?: proto_othercom_external_child_message_pb.ExternalChildMessage$AsClass$AsObject, + externalChildrenList: Array, +} + +export class ParentMessageV3$AsClass_InternalChildMessage$AsClass extends jspb.Message { + getMyString: () => string; + setMyString: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => ParentMessageV3$AsClass_InternalChildMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: ParentMessageV3$AsClass_InternalChildMessage$AsClass) => ParentMessageV3$AsClass_InternalChildMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: ParentMessageV3$AsClass_InternalChildMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => ParentMessageV3$AsClass_InternalChildMessage$AsClass; + static deserializeBinaryFromReader: (message: ParentMessageV3$AsClass_InternalChildMessage$AsClass, reader: jspb.BinaryReader) => ParentMessageV3$AsClass_InternalChildMessage$AsClass; +} + +export type ParentMessageV3$AsClass_InternalChildMessage$AsClass$AsObject = { + myString: string, +} + diff --git a/examples/generated/proto/examplecom/primitive_message_v2_pb.d.ts b/examples/generated/proto/examplecom/primitive_message_v2_pb.d.ts deleted file mode 100644 index 8cd1dfe1..00000000 --- a/examples/generated/proto/examplecom/primitive_message_v2_pb.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -// package: examplecom -// file: proto/examplecom/primitive_message_v2.proto - -import * as jspb from "google-protobuf"; - -export class PrimitiveMessageV2 extends jspb.Message { - hasMyDouble(): boolean; - clearMyDouble(): void; - getMyDouble(): number | undefined; - setMyDouble(value: number): void; - - hasMyFloat(): boolean; - clearMyFloat(): void; - getMyFloat(): number | undefined; - setMyFloat(value: number): void; - - hasMyInt32(): boolean; - clearMyInt32(): void; - getMyInt32(): number | undefined; - setMyInt32(value: number): void; - - hasMyInt64(): boolean; - clearMyInt64(): void; - getMyInt64(): number | undefined; - setMyInt64(value: number): void; - - hasMyUint32(): boolean; - clearMyUint32(): void; - getMyUint32(): number | undefined; - setMyUint32(value: number): void; - - hasMyUint64(): boolean; - clearMyUint64(): void; - getMyUint64(): number | undefined; - setMyUint64(value: number): void; - - hasMySint32(): boolean; - clearMySint32(): void; - getMySint32(): number | undefined; - setMySint32(value: number): void; - - hasMySint64(): boolean; - clearMySint64(): void; - getMySint64(): number | undefined; - setMySint64(value: number): void; - - hasMyFixed32(): boolean; - clearMyFixed32(): void; - getMyFixed32(): number | undefined; - setMyFixed32(value: number): void; - - hasMyFixed64(): boolean; - clearMyFixed64(): void; - getMyFixed64(): number | undefined; - setMyFixed64(value: number): void; - - hasMySfixed32(): boolean; - clearMySfixed32(): void; - getMySfixed32(): number | undefined; - setMySfixed32(value: number): void; - - hasMySfixed64(): boolean; - clearMySfixed64(): void; - getMySfixed64(): number | undefined; - setMySfixed64(value: number): void; - - hasMyBool(): boolean; - clearMyBool(): void; - getMyBool(): boolean | undefined; - setMyBool(value: boolean): void; - - hasMyString(): boolean; - clearMyString(): void; - getMyString(): string | undefined; - setMyString(value: string): void; - - hasMyBytes(): boolean; - clearMyBytes(): void; - getMyBytes(): Uint8Array | string; - getMyBytes_asU8(): Uint8Array; - getMyBytes_asB64(): string; - setMyBytes(value: Uint8Array | string): void; - - hasOptDouble(): boolean; - clearOptDouble(): void; - getOptDouble(): number | undefined; - setOptDouble(value: number): void; - - hasOptFloat(): boolean; - clearOptFloat(): void; - getOptFloat(): number | undefined; - setOptFloat(value: number): void; - - hasOptInt32(): boolean; - clearOptInt32(): void; - getOptInt32(): number | undefined; - setOptInt32(value: number): void; - - hasOptInt64(): boolean; - clearOptInt64(): void; - getOptInt64(): number | undefined; - setOptInt64(value: number): void; - - hasOptUint32(): boolean; - clearOptUint32(): void; - getOptUint32(): number | undefined; - setOptUint32(value: number): void; - - hasOptUint64(): boolean; - clearOptUint64(): void; - getOptUint64(): number | undefined; - setOptUint64(value: number): void; - - hasOptSint32(): boolean; - clearOptSint32(): void; - getOptSint32(): number | undefined; - setOptSint32(value: number): void; - - hasOptSint64(): boolean; - clearOptSint64(): void; - getOptSint64(): number | undefined; - setOptSint64(value: number): void; - - hasOptFixed32(): boolean; - clearOptFixed32(): void; - getOptFixed32(): number | undefined; - setOptFixed32(value: number): void; - - hasOptFixed64(): boolean; - clearOptFixed64(): void; - getOptFixed64(): number | undefined; - setOptFixed64(value: number): void; - - hasOptSfixed32(): boolean; - clearOptSfixed32(): void; - getOptSfixed32(): number | undefined; - setOptSfixed32(value: number): void; - - hasOptSfixed64(): boolean; - clearOptSfixed64(): void; - getOptSfixed64(): number | undefined; - setOptSfixed64(value: number): void; - - hasOptBool(): boolean; - clearOptBool(): void; - getOptBool(): boolean | undefined; - setOptBool(value: boolean): void; - - hasOptString(): boolean; - clearOptString(): void; - getOptString(): string | undefined; - setOptString(value: string): void; - - hasOptBytes(): boolean; - clearOptBytes(): void; - getOptBytes(): Uint8Array | string; - getOptBytes_asU8(): Uint8Array; - getOptBytes_asB64(): string; - setOptBytes(value: Uint8Array | string): void; - - hasOptNumber(): boolean; - clearOptNumber(): void; - getOptNumber(): number | undefined; - setOptNumber(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PrimitiveMessageV2.AsObject; - static toObject(includeInstance: boolean, msg: PrimitiveMessageV2): PrimitiveMessageV2.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PrimitiveMessageV2, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PrimitiveMessageV2; - static deserializeBinaryFromReader(message: PrimitiveMessageV2, reader: jspb.BinaryReader): PrimitiveMessageV2; -} - -export namespace PrimitiveMessageV2 { - export type AsObject = { - myDouble?: number, - myFloat?: number, - myInt32?: number, - myInt64?: number, - myUint32?: number, - myUint64?: number, - mySint32?: number, - mySint64?: number, - myFixed32?: number, - myFixed64?: number, - mySfixed32?: number, - mySfixed64?: number, - myBool?: boolean, - myString?: string, - myBytes: Uint8Array | string, - optDouble?: number, - optFloat?: number, - optInt32?: number, - optInt64?: number, - optUint32?: number, - optUint64?: number, - optSint32?: number, - optSint64?: number, - optFixed32?: number, - optFixed64?: number, - optSfixed32?: number, - optSfixed64?: number, - optBool?: boolean, - optString?: string, - optBytes: Uint8Array | string, - optNumber?: number, - } -} - diff --git a/examples/generated/proto/examplecom/primitive_message_v2_pb.flow.js b/examples/generated/proto/examplecom/primitive_message_v2_pb.flow.js new file mode 100644 index 00000000..a76ad181 --- /dev/null +++ b/examples/generated/proto/examplecom/primitive_message_v2_pb.flow.js @@ -0,0 +1,210 @@ +// @flow +// package: examplecom +// file: proto/examplecom/primitive_message_v2.proto + +import * as jspb from "google-protobuf"; + +export class PrimitiveMessageV2$AsClass extends jspb.Message { + hasMyDouble: () => boolean; + clearMyDouble: () => void; + getMyDouble: () => ?number; + setMyDouble: (value: number) => void; + + hasMyFloat: () => boolean; + clearMyFloat: () => void; + getMyFloat: () => ?number; + setMyFloat: (value: number) => void; + + hasMyInt32: () => boolean; + clearMyInt32: () => void; + getMyInt32: () => ?number; + setMyInt32: (value: number) => void; + + hasMyInt64: () => boolean; + clearMyInt64: () => void; + getMyInt64: () => ?number; + setMyInt64: (value: number) => void; + + hasMyUint32: () => boolean; + clearMyUint32: () => void; + getMyUint32: () => ?number; + setMyUint32: (value: number) => void; + + hasMyUint64: () => boolean; + clearMyUint64: () => void; + getMyUint64: () => ?number; + setMyUint64: (value: number) => void; + + hasMySint32: () => boolean; + clearMySint32: () => void; + getMySint32: () => ?number; + setMySint32: (value: number) => void; + + hasMySint64: () => boolean; + clearMySint64: () => void; + getMySint64: () => ?number; + setMySint64: (value: number) => void; + + hasMyFixed32: () => boolean; + clearMyFixed32: () => void; + getMyFixed32: () => ?number; + setMyFixed32: (value: number) => void; + + hasMyFixed64: () => boolean; + clearMyFixed64: () => void; + getMyFixed64: () => ?number; + setMyFixed64: (value: number) => void; + + hasMySfixed32: () => boolean; + clearMySfixed32: () => void; + getMySfixed32: () => ?number; + setMySfixed32: (value: number) => void; + + hasMySfixed64: () => boolean; + clearMySfixed64: () => void; + getMySfixed64: () => ?number; + setMySfixed64: (value: number) => void; + + hasMyBool: () => boolean; + clearMyBool: () => void; + getMyBool: () => ?boolean; + setMyBool: (value: boolean) => void; + + hasMyString: () => boolean; + clearMyString: () => void; + getMyString: () => ?string; + setMyString: (value: string) => void; + + hasMyBytes: () => boolean; + clearMyBytes: () => void; + getMyBytes: () => Uint8Array | string; + getMyBytes_asU8: () => Uint8Array; + getMyBytes_asB64: () => string; + setMyBytes: (value: Uint8Array | string) => void; + + hasOptDouble: () => boolean; + clearOptDouble: () => void; + getOptDouble: () => ?number; + setOptDouble: (value: number) => void; + + hasOptFloat: () => boolean; + clearOptFloat: () => void; + getOptFloat: () => ?number; + setOptFloat: (value: number) => void; + + hasOptInt32: () => boolean; + clearOptInt32: () => void; + getOptInt32: () => ?number; + setOptInt32: (value: number) => void; + + hasOptInt64: () => boolean; + clearOptInt64: () => void; + getOptInt64: () => ?number; + setOptInt64: (value: number) => void; + + hasOptUint32: () => boolean; + clearOptUint32: () => void; + getOptUint32: () => ?number; + setOptUint32: (value: number) => void; + + hasOptUint64: () => boolean; + clearOptUint64: () => void; + getOptUint64: () => ?number; + setOptUint64: (value: number) => void; + + hasOptSint32: () => boolean; + clearOptSint32: () => void; + getOptSint32: () => ?number; + setOptSint32: (value: number) => void; + + hasOptSint64: () => boolean; + clearOptSint64: () => void; + getOptSint64: () => ?number; + setOptSint64: (value: number) => void; + + hasOptFixed32: () => boolean; + clearOptFixed32: () => void; + getOptFixed32: () => ?number; + setOptFixed32: (value: number) => void; + + hasOptFixed64: () => boolean; + clearOptFixed64: () => void; + getOptFixed64: () => ?number; + setOptFixed64: (value: number) => void; + + hasOptSfixed32: () => boolean; + clearOptSfixed32: () => void; + getOptSfixed32: () => ?number; + setOptSfixed32: (value: number) => void; + + hasOptSfixed64: () => boolean; + clearOptSfixed64: () => void; + getOptSfixed64: () => ?number; + setOptSfixed64: (value: number) => void; + + hasOptBool: () => boolean; + clearOptBool: () => void; + getOptBool: () => ?boolean; + setOptBool: (value: boolean) => void; + + hasOptString: () => boolean; + clearOptString: () => void; + getOptString: () => ?string; + setOptString: (value: string) => void; + + hasOptBytes: () => boolean; + clearOptBytes: () => void; + getOptBytes: () => Uint8Array | string; + getOptBytes_asU8: () => Uint8Array; + getOptBytes_asB64: () => string; + setOptBytes: (value: Uint8Array | string) => void; + + hasOptNumber: () => boolean; + clearOptNumber: () => void; + getOptNumber: () => ?number; + setOptNumber: (value: number) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => PrimitiveMessageV2$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: PrimitiveMessageV2$AsClass) => PrimitiveMessageV2$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: PrimitiveMessageV2$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => PrimitiveMessageV2$AsClass; + static deserializeBinaryFromReader: (message: PrimitiveMessageV2$AsClass, reader: jspb.BinaryReader) => PrimitiveMessageV2$AsClass; +} + +export type PrimitiveMessageV2$AsClass$AsObject = { + myDouble?: number, + myFloat?: number, + myInt32?: number, + myInt64?: number, + myUint32?: number, + myUint64?: number, + mySint32?: number, + mySint64?: number, + myFixed32?: number, + myFixed64?: number, + mySfixed32?: number, + mySfixed64?: number, + myBool?: boolean, + myString?: string, + myBytes: Uint8Array | string, + optDouble?: number, + optFloat?: number, + optInt32?: number, + optInt64?: number, + optUint32?: number, + optUint64?: number, + optSint32?: number, + optSint64?: number, + optFixed32?: number, + optFixed64?: number, + optSfixed32?: number, + optSfixed64?: number, + optBool?: boolean, + optString?: string, + optBytes: Uint8Array | string, + optNumber?: number, +} + diff --git a/examples/generated/proto/examplecom/primitive_message_v3_pb.d.ts b/examples/generated/proto/examplecom/primitive_message_v3_pb.d.ts deleted file mode 100644 index 2f8b1f49..00000000 --- a/examples/generated/proto/examplecom/primitive_message_v3_pb.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -// package: examplecom -// file: proto/examplecom/primitive_message_v3.proto - -import * as jspb from "google-protobuf"; - -export class PrimitiveMessageV3 extends jspb.Message { - getMyDouble(): number; - setMyDouble(value: number): void; - - getMyFloat(): number; - setMyFloat(value: number): void; - - getMyInt32(): number; - setMyInt32(value: number): void; - - getMyInt64(): number; - setMyInt64(value: number): void; - - getMyUint32(): number; - setMyUint32(value: number): void; - - getMyUint64(): number; - setMyUint64(value: number): void; - - getMySint32(): number; - setMySint32(value: number): void; - - getMySint64(): number; - setMySint64(value: number): void; - - getMyFixed32(): number; - setMyFixed32(value: number): void; - - getMyFixed64(): number; - setMyFixed64(value: number): void; - - getMySfixed32(): number; - setMySfixed32(value: number): void; - - getMySfixed64(): number; - setMySfixed64(value: number): void; - - getMyBool(): boolean; - setMyBool(value: boolean): void; - - getMyString(): string; - setMyString(value: string): void; - - getMyBytes(): Uint8Array | string; - getMyBytes_asU8(): Uint8Array; - getMyBytes_asB64(): string; - setMyBytes(value: Uint8Array | string): void; - - getMyNumber(): number; - setMyNumber(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PrimitiveMessageV3.AsObject; - static toObject(includeInstance: boolean, msg: PrimitiveMessageV3): PrimitiveMessageV3.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PrimitiveMessageV3, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PrimitiveMessageV3; - static deserializeBinaryFromReader(message: PrimitiveMessageV3, reader: jspb.BinaryReader): PrimitiveMessageV3; -} - -export namespace PrimitiveMessageV3 { - export type AsObject = { - myDouble: number, - myFloat: number, - myInt32: number, - myInt64: number, - myUint32: number, - myUint64: number, - mySint32: number, - mySint64: number, - myFixed32: number, - myFixed64: number, - mySfixed32: number, - mySfixed64: number, - myBool: boolean, - myString: string, - myBytes: Uint8Array | string, - myNumber: number, - } -} - diff --git a/examples/generated/proto/examplecom/primitive_message_v3_pb.flow.js b/examples/generated/proto/examplecom/primitive_message_v3_pb.flow.js new file mode 100644 index 00000000..140f6792 --- /dev/null +++ b/examples/generated/proto/examplecom/primitive_message_v3_pb.flow.js @@ -0,0 +1,86 @@ +// @flow +// package: examplecom +// file: proto/examplecom/primitive_message_v3.proto + +import * as jspb from "google-protobuf"; + +export class PrimitiveMessageV3$AsClass extends jspb.Message { + getMyDouble: () => number; + setMyDouble: (value: number) => void; + + getMyFloat: () => number; + setMyFloat: (value: number) => void; + + getMyInt32: () => number; + setMyInt32: (value: number) => void; + + getMyInt64: () => number; + setMyInt64: (value: number) => void; + + getMyUint32: () => number; + setMyUint32: (value: number) => void; + + getMyUint64: () => number; + setMyUint64: (value: number) => void; + + getMySint32: () => number; + setMySint32: (value: number) => void; + + getMySint64: () => number; + setMySint64: (value: number) => void; + + getMyFixed32: () => number; + setMyFixed32: (value: number) => void; + + getMyFixed64: () => number; + setMyFixed64: (value: number) => void; + + getMySfixed32: () => number; + setMySfixed32: (value: number) => void; + + getMySfixed64: () => number; + setMySfixed64: (value: number) => void; + + getMyBool: () => boolean; + setMyBool: (value: boolean) => void; + + getMyString: () => string; + setMyString: (value: string) => void; + + getMyBytes: () => Uint8Array | string; + getMyBytes_asU8: () => Uint8Array; + getMyBytes_asB64: () => string; + setMyBytes: (value: Uint8Array | string) => void; + + getMyNumber: () => number; + setMyNumber: (value: number) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => PrimitiveMessageV3$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: PrimitiveMessageV3$AsClass) => PrimitiveMessageV3$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: PrimitiveMessageV3$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => PrimitiveMessageV3$AsClass; + static deserializeBinaryFromReader: (message: PrimitiveMessageV3$AsClass, reader: jspb.BinaryReader) => PrimitiveMessageV3$AsClass; +} + +export type PrimitiveMessageV3$AsClass$AsObject = { + myDouble: number, + myFloat: number, + myInt32: number, + myInt64: number, + myUint32: number, + myUint64: number, + mySint32: number, + mySint64: number, + myFixed32: number, + myFixed64: number, + mySfixed32: number, + mySfixed64: number, + myBool: boolean, + myString: string, + myBytes: Uint8Array | string, + myNumber: number, +} + diff --git a/examples/generated/proto/examplecom/repeated_primitive_message_pb.d.ts b/examples/generated/proto/examplecom/repeated_primitive_message_pb.d.ts deleted file mode 100644 index 2492a87c..00000000 --- a/examples/generated/proto/examplecom/repeated_primitive_message_pb.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -// package: examplecom -// file: proto/examplecom/repeated_primitive_message.proto - -import * as jspb from "google-protobuf"; - -export class RepeatedPrimitiveMessage extends jspb.Message { - clearMyDoubleList(): void; - getMyDoubleList(): Array; - setMyDoubleList(value: Array): void; - addMyDouble(value: number, index?: number): number; - - clearMyFloatList(): void; - getMyFloatList(): Array; - setMyFloatList(value: Array): void; - addMyFloat(value: number, index?: number): number; - - clearMyInt32List(): void; - getMyInt32List(): Array; - setMyInt32List(value: Array): void; - addMyInt32(value: number, index?: number): number; - - clearMyInt64List(): void; - getMyInt64List(): Array; - setMyInt64List(value: Array): void; - addMyInt64(value: number, index?: number): number; - - clearMyUint32List(): void; - getMyUint32List(): Array; - setMyUint32List(value: Array): void; - addMyUint32(value: number, index?: number): number; - - clearMyUint64List(): void; - getMyUint64List(): Array; - setMyUint64List(value: Array): void; - addMyUint64(value: number, index?: number): number; - - clearMySint32List(): void; - getMySint32List(): Array; - setMySint32List(value: Array): void; - addMySint32(value: number, index?: number): number; - - clearMySint64List(): void; - getMySint64List(): Array; - setMySint64List(value: Array): void; - addMySint64(value: number, index?: number): number; - - clearMyFixed32List(): void; - getMyFixed32List(): Array; - setMyFixed32List(value: Array): void; - addMyFixed32(value: number, index?: number): number; - - clearMyFixed64List(): void; - getMyFixed64List(): Array; - setMyFixed64List(value: Array): void; - addMyFixed64(value: number, index?: number): number; - - clearMySfixed32List(): void; - getMySfixed32List(): Array; - setMySfixed32List(value: Array): void; - addMySfixed32(value: number, index?: number): number; - - clearMySfixed64List(): void; - getMySfixed64List(): Array; - setMySfixed64List(value: Array): void; - addMySfixed64(value: number, index?: number): number; - - clearMyBoolList(): void; - getMyBoolList(): Array; - setMyBoolList(value: Array): void; - addMyBool(value: boolean, index?: number): boolean; - - clearMyStringList(): void; - getMyStringList(): Array; - setMyStringList(value: Array): void; - addMyString(value: string, index?: number): string; - - clearMyBytesList(): void; - getMyBytesList(): Array; - getMyBytesList_asU8(): Array; - getMyBytesList_asB64(): Array; - setMyBytesList(value: Array): void; - addMyBytes(value: Uint8Array | string, index?: number): Uint8Array | string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RepeatedPrimitiveMessage.AsObject; - static toObject(includeInstance: boolean, msg: RepeatedPrimitiveMessage): RepeatedPrimitiveMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RepeatedPrimitiveMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RepeatedPrimitiveMessage; - static deserializeBinaryFromReader(message: RepeatedPrimitiveMessage, reader: jspb.BinaryReader): RepeatedPrimitiveMessage; -} - -export namespace RepeatedPrimitiveMessage { - export type AsObject = { - myDoubleList: Array, - myFloatList: Array, - myInt32List: Array, - myInt64List: Array, - myUint32List: Array, - myUint64List: Array, - mySint32List: Array, - mySint64List: Array, - myFixed32List: Array, - myFixed64List: Array, - mySfixed32List: Array, - mySfixed64List: Array, - myBoolList: Array, - myStringList: Array, - myBytesList: Array, - } -} - diff --git a/examples/generated/proto/examplecom/repeated_primitive_message_pb.flow.js b/examples/generated/proto/examplecom/repeated_primitive_message_pb.flow.js new file mode 100644 index 00000000..73309011 --- /dev/null +++ b/examples/generated/proto/examplecom/repeated_primitive_message_pb.flow.js @@ -0,0 +1,112 @@ +// @flow +// package: examplecom +// file: proto/examplecom/repeated_primitive_message.proto + +import * as jspb from "google-protobuf"; + +export class RepeatedPrimitiveMessage$AsClass extends jspb.Message { + clearMyDoubleList: () => void; + getMyDoubleList: () => Array; + setMyDoubleList: (value: Array) => void; + addMyDouble: (value: number, index?: number) => number; + + clearMyFloatList: () => void; + getMyFloatList: () => Array; + setMyFloatList: (value: Array) => void; + addMyFloat: (value: number, index?: number) => number; + + clearMyInt32List: () => void; + getMyInt32List: () => Array; + setMyInt32List: (value: Array) => void; + addMyInt32: (value: number, index?: number) => number; + + clearMyInt64List: () => void; + getMyInt64List: () => Array; + setMyInt64List: (value: Array) => void; + addMyInt64: (value: number, index?: number) => number; + + clearMyUint32List: () => void; + getMyUint32List: () => Array; + setMyUint32List: (value: Array) => void; + addMyUint32: (value: number, index?: number) => number; + + clearMyUint64List: () => void; + getMyUint64List: () => Array; + setMyUint64List: (value: Array) => void; + addMyUint64: (value: number, index?: number) => number; + + clearMySint32List: () => void; + getMySint32List: () => Array; + setMySint32List: (value: Array) => void; + addMySint32: (value: number, index?: number) => number; + + clearMySint64List: () => void; + getMySint64List: () => Array; + setMySint64List: (value: Array) => void; + addMySint64: (value: number, index?: number) => number; + + clearMyFixed32List: () => void; + getMyFixed32List: () => Array; + setMyFixed32List: (value: Array) => void; + addMyFixed32: (value: number, index?: number) => number; + + clearMyFixed64List: () => void; + getMyFixed64List: () => Array; + setMyFixed64List: (value: Array) => void; + addMyFixed64: (value: number, index?: number) => number; + + clearMySfixed32List: () => void; + getMySfixed32List: () => Array; + setMySfixed32List: (value: Array) => void; + addMySfixed32: (value: number, index?: number) => number; + + clearMySfixed64List: () => void; + getMySfixed64List: () => Array; + setMySfixed64List: (value: Array) => void; + addMySfixed64: (value: number, index?: number) => number; + + clearMyBoolList: () => void; + getMyBoolList: () => Array; + setMyBoolList: (value: Array) => void; + addMyBool: (value: boolean, index?: number) => boolean; + + clearMyStringList: () => void; + getMyStringList: () => Array; + setMyStringList: (value: Array) => void; + addMyString: (value: string, index?: number) => string; + + clearMyBytesList: () => void; + getMyBytesList: () => Array; + getMyBytesList_asU8: () => Array; + getMyBytesList_asB64: () => Array; + setMyBytesList: (value: Array) => void; + addMyBytes: (value: Uint8Array | string, index?: number) => Uint8Array | string; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => RepeatedPrimitiveMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: RepeatedPrimitiveMessage$AsClass) => RepeatedPrimitiveMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: RepeatedPrimitiveMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => RepeatedPrimitiveMessage$AsClass; + static deserializeBinaryFromReader: (message: RepeatedPrimitiveMessage$AsClass, reader: jspb.BinaryReader) => RepeatedPrimitiveMessage$AsClass; +} + +export type RepeatedPrimitiveMessage$AsClass$AsObject = { + myDoubleList: Array, + myFloatList: Array, + myInt32List: Array, + myInt64List: Array, + myUint32List: Array, + myUint64List: Array, + mySint32List: Array, + mySint64List: Array, + myFixed32List: Array, + myFixed64List: Array, + mySfixed32List: Array, + mySfixed64List: Array, + myBoolList: Array, + myStringList: Array, + myBytesList: Array, +} + diff --git a/examples/generated/proto/examplecom/reserved_words_pb.d.ts b/examples/generated/proto/examplecom/reserved_words_pb.d.ts deleted file mode 100644 index b6b11613..00000000 --- a/examples/generated/proto/examplecom/reserved_words_pb.d.ts +++ /dev/null @@ -1,253 +0,0 @@ -// package: examplecom -// file: proto/examplecom/reserved_words.proto - -import * as jspb from "google-protobuf"; - -export class ReservedWordsMessage extends jspb.Message { - getAbstract(): string; - setAbstract(value: string): void; - - getBoolean(): string; - setBoolean(value: string): void; - - getBreak(): string; - setBreak(value: string): void; - - getByte(): string; - setByte(value: string): void; - - getCase(): string; - setCase(value: string): void; - - getCatch(): string; - setCatch(value: string): void; - - getChar(): string; - setChar(value: string): void; - - getClass(): string; - setClass(value: string): void; - - getConst(): string; - setConst(value: string): void; - - getContinue(): string; - setContinue(value: string): void; - - getDebugger(): string; - setDebugger(value: string): void; - - getDefault(): string; - setDefault(value: string): void; - - getDelete(): string; - setDelete(value: string): void; - - getDo(): string; - setDo(value: string): void; - - getDouble(): string; - setDouble(value: string): void; - - getElse(): string; - setElse(value: string): void; - - getEnum(): string; - setEnum(value: string): void; - - getExport(): string; - setExport(value: string): void; - - getExtends(): string; - setExtends(value: string): void; - - getFalse(): string; - setFalse(value: string): void; - - getFinal(): string; - setFinal(value: string): void; - - getFinally(): string; - setFinally(value: string): void; - - getFloat(): string; - setFloat(value: string): void; - - getFor(): string; - setFor(value: string): void; - - getFunction(): string; - setFunction(value: string): void; - - getGoto(): string; - setGoto(value: string): void; - - getIf(): string; - setIf(value: string): void; - - getImplements(): string; - setImplements(value: string): void; - - getImport(): string; - setImport(value: string): void; - - getIn(): string; - setIn(value: string): void; - - getInstanceof(): string; - setInstanceof(value: string): void; - - getInt(): string; - setInt(value: string): void; - - getInterface(): string; - setInterface(value: string): void; - - getLong(): string; - setLong(value: string): void; - - getNative(): string; - setNative(value: string): void; - - getNew(): string; - setNew(value: string): void; - - getNull(): string; - setNull(value: string): void; - - getPackage(): string; - setPackage(value: string): void; - - getPrivate(): string; - setPrivate(value: string): void; - - getProtected(): string; - setProtected(value: string): void; - - getPublic(): string; - setPublic(value: string): void; - - getReturn(): string; - setReturn(value: string): void; - - getShort(): string; - setShort(value: string): void; - - getStatic(): string; - setStatic(value: string): void; - - getSuper(): string; - setSuper(value: string): void; - - getSwitch(): string; - setSwitch(value: string): void; - - getSynchronized(): string; - setSynchronized(value: string): void; - - getThis(): string; - setThis(value: string): void; - - getThrow(): string; - setThrow(value: string): void; - - getThrows(): string; - setThrows(value: string): void; - - getTransient(): string; - setTransient(value: string): void; - - getTry(): string; - setTry(value: string): void; - - getTypeof(): string; - setTypeof(value: string): void; - - getVar(): string; - setVar(value: string): void; - - getVoid(): string; - setVoid(value: string): void; - - getVolatile(): string; - setVolatile(value: string): void; - - getWhile(): string; - setWhile(value: string): void; - - getWith(): string; - setWith(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReservedWordsMessage.AsObject; - static toObject(includeInstance: boolean, msg: ReservedWordsMessage): ReservedWordsMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReservedWordsMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReservedWordsMessage; - static deserializeBinaryFromReader(message: ReservedWordsMessage, reader: jspb.BinaryReader): ReservedWordsMessage; -} - -export namespace ReservedWordsMessage { - export type AsObject = { - pb_abstract: string, - pb_boolean: string, - pb_break: string, - pb_byte: string, - pb_case: string, - pb_catch: string, - pb_char: string, - pb_class: string, - pb_const: string, - pb_continue: string, - pb_debugger: string, - pb_default: string, - pb_delete: string, - pb_do: string, - pb_double: string, - pb_else: string, - pb_enum: string, - pb_export: string, - pb_extends: string, - pb_false: string, - pb_final: string, - pb_finally: string, - pb_float: string, - pb_for: string, - pb_function: string, - pb_goto: string, - pb_if: string, - pb_implements: string, - pb_import: string, - pb_in: string, - pb_instanceof: string, - pb_int: string, - pb_interface: string, - pb_long: string, - pb_native: string, - pb_new: string, - pb_null: string, - pb_package: string, - pb_private: string, - pb_protected: string, - pb_public: string, - pb_return: string, - pb_short: string, - pb_static: string, - pb_super: string, - pb_switch: string, - pb_synchronized: string, - pb_this: string, - pb_throw: string, - pb_throws: string, - pb_transient: string, - pb_try: string, - pb_typeof: string, - pb_var: string, - pb_void: string, - pb_volatile: string, - pb_while: string, - pb_with: string, - } -} - diff --git a/examples/generated/proto/examplecom/reserved_words_pb.flow.js b/examples/generated/proto/examplecom/reserved_words_pb.flow.js new file mode 100644 index 00000000..c09e0419 --- /dev/null +++ b/examples/generated/proto/examplecom/reserved_words_pb.flow.js @@ -0,0 +1,252 @@ +// @flow +// package: examplecom +// file: proto/examplecom/reserved_words.proto + +import * as jspb from "google-protobuf"; + +export class ReservedWordsMessage$AsClass extends jspb.Message { + getAbstract: () => string; + setAbstract: (value: string) => void; + + getBoolean: () => string; + setBoolean: (value: string) => void; + + getBreak: () => string; + setBreak: (value: string) => void; + + getByte: () => string; + setByte: (value: string) => void; + + getCase: () => string; + setCase: (value: string) => void; + + getCatch: () => string; + setCatch: (value: string) => void; + + getChar: () => string; + setChar: (value: string) => void; + + getClass: () => string; + setClass: (value: string) => void; + + getConst: () => string; + setConst: (value: string) => void; + + getContinue: () => string; + setContinue: (value: string) => void; + + getDebugger: () => string; + setDebugger: (value: string) => void; + + getDefault: () => string; + setDefault: (value: string) => void; + + getDelete: () => string; + setDelete: (value: string) => void; + + getDo: () => string; + setDo: (value: string) => void; + + getDouble: () => string; + setDouble: (value: string) => void; + + getElse: () => string; + setElse: (value: string) => void; + + getEnum: () => string; + setEnum: (value: string) => void; + + getExport: () => string; + setExport: (value: string) => void; + + getExtends: () => string; + setExtends: (value: string) => void; + + getFalse: () => string; + setFalse: (value: string) => void; + + getFinal: () => string; + setFinal: (value: string) => void; + + getFinally: () => string; + setFinally: (value: string) => void; + + getFloat: () => string; + setFloat: (value: string) => void; + + getFor: () => string; + setFor: (value: string) => void; + + getFunction: () => string; + setFunction: (value: string) => void; + + getGoto: () => string; + setGoto: (value: string) => void; + + getIf: () => string; + setIf: (value: string) => void; + + getImplements: () => string; + setImplements: (value: string) => void; + + getImport: () => string; + setImport: (value: string) => void; + + getIn: () => string; + setIn: (value: string) => void; + + getInstanceof: () => string; + setInstanceof: (value: string) => void; + + getInt: () => string; + setInt: (value: string) => void; + + getInterface: () => string; + setInterface: (value: string) => void; + + getLong: () => string; + setLong: (value: string) => void; + + getNative: () => string; + setNative: (value: string) => void; + + getNew: () => string; + setNew: (value: string) => void; + + getNull: () => string; + setNull: (value: string) => void; + + getPackage: () => string; + setPackage: (value: string) => void; + + getPrivate: () => string; + setPrivate: (value: string) => void; + + getProtected: () => string; + setProtected: (value: string) => void; + + getPublic: () => string; + setPublic: (value: string) => void; + + getReturn: () => string; + setReturn: (value: string) => void; + + getShort: () => string; + setShort: (value: string) => void; + + getStatic: () => string; + setStatic: (value: string) => void; + + getSuper: () => string; + setSuper: (value: string) => void; + + getSwitch: () => string; + setSwitch: (value: string) => void; + + getSynchronized: () => string; + setSynchronized: (value: string) => void; + + getThis: () => string; + setThis: (value: string) => void; + + getThrow: () => string; + setThrow: (value: string) => void; + + getThrows: () => string; + setThrows: (value: string) => void; + + getTransient: () => string; + setTransient: (value: string) => void; + + getTry: () => string; + setTry: (value: string) => void; + + getTypeof: () => string; + setTypeof: (value: string) => void; + + getVar: () => string; + setVar: (value: string) => void; + + getVoid: () => string; + setVoid: (value: string) => void; + + getVolatile: () => string; + setVolatile: (value: string) => void; + + getWhile: () => string; + setWhile: (value: string) => void; + + getWith: () => string; + setWith: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => ReservedWordsMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: ReservedWordsMessage$AsClass) => ReservedWordsMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: ReservedWordsMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => ReservedWordsMessage$AsClass; + static deserializeBinaryFromReader: (message: ReservedWordsMessage$AsClass, reader: jspb.BinaryReader) => ReservedWordsMessage$AsClass; +} + +export type ReservedWordsMessage$AsClass$AsObject = { + pb_abstract: string, + pb_boolean: string, + pb_break: string, + pb_byte: string, + pb_case: string, + pb_catch: string, + pb_char: string, + pb_class: string, + pb_const: string, + pb_continue: string, + pb_debugger: string, + pb_default: string, + pb_delete: string, + pb_do: string, + pb_double: string, + pb_else: string, + pb_enum: string, + pb_export: string, + pb_extends: string, + pb_false: string, + pb_final: string, + pb_finally: string, + pb_float: string, + pb_for: string, + pb_function: string, + pb_goto: string, + pb_if: string, + pb_implements: string, + pb_import: string, + pb_in: string, + pb_instanceof: string, + pb_int: string, + pb_interface: string, + pb_long: string, + pb_native: string, + pb_new: string, + pb_null: string, + pb_package: string, + pb_private: string, + pb_protected: string, + pb_public: string, + pb_return: string, + pb_short: string, + pb_static: string, + pb_super: string, + pb_switch: string, + pb_synchronized: string, + pb_this: string, + pb_throw: string, + pb_throws: string, + pb_transient: string, + pb_try: string, + pb_typeof: string, + pb_var: string, + pb_void: string, + pb_volatile: string, + pb_while: string, + pb_with: string, +} + diff --git a/examples/generated/proto/examplecom/simple_pb.d.ts b/examples/generated/proto/examplecom/simple_pb.d.ts deleted file mode 100644 index 9384ef61..00000000 --- a/examples/generated/proto/examplecom/simple_pb.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -// package: examplecom -// file: proto/examplecom/simple.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_compiler_plugin_pb from "google-protobuf/google/protobuf/compiler/plugin_pb"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; -import * as google_protobuf_api_pb from "google-protobuf/google/protobuf/api_pb"; -import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; -import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; -import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; -import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; -import * as google_protobuf_source_context_pb from "google-protobuf/google/protobuf/source_context_pb"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as google_protobuf_type_pb from "google-protobuf/google/protobuf/type_pb"; -import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; - -export class MySimple extends jspb.Message { - getMyString(): string; - setMyString(value: string): void; - - getMyBool(): boolean; - setMyBool(value: boolean): void; - - clearSomeLabelsList(): void; - getSomeLabelsList(): Array; - setSomeLabelsList(value: Array): void; - addSomeLabels(value: string, index?: number): string; - - hasSomeCodeGeneratorRequest(): boolean; - clearSomeCodeGeneratorRequest(): void; - getSomeCodeGeneratorRequest(): google_protobuf_compiler_plugin_pb.CodeGeneratorRequest | undefined; - setSomeCodeGeneratorRequest(value?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest): void; - - hasSomeAny(): boolean; - clearSomeAny(): void; - getSomeAny(): google_protobuf_any_pb.Any | undefined; - setSomeAny(value?: google_protobuf_any_pb.Any): void; - - hasSomeMethod(): boolean; - clearSomeMethod(): void; - getSomeMethod(): google_protobuf_api_pb.Method | undefined; - setSomeMethod(value?: google_protobuf_api_pb.Method): void; - - hasSomeGeneratedCodeInfo(): boolean; - clearSomeGeneratedCodeInfo(): void; - getSomeGeneratedCodeInfo(): google_protobuf_descriptor_pb.GeneratedCodeInfo | undefined; - setSomeGeneratedCodeInfo(value?: google_protobuf_descriptor_pb.GeneratedCodeInfo): void; - - hasSomeDuration(): boolean; - clearSomeDuration(): void; - getSomeDuration(): google_protobuf_duration_pb.Duration | undefined; - setSomeDuration(value?: google_protobuf_duration_pb.Duration): void; - - hasSomeEmpty(): boolean; - clearSomeEmpty(): void; - getSomeEmpty(): google_protobuf_empty_pb.Empty | undefined; - setSomeEmpty(value?: google_protobuf_empty_pb.Empty): void; - - hasSomeFieldMask(): boolean; - clearSomeFieldMask(): void; - getSomeFieldMask(): google_protobuf_field_mask_pb.FieldMask | undefined; - setSomeFieldMask(value?: google_protobuf_field_mask_pb.FieldMask): void; - - hasSomeSourceContext(): boolean; - clearSomeSourceContext(): void; - getSomeSourceContext(): google_protobuf_source_context_pb.SourceContext | undefined; - setSomeSourceContext(value?: google_protobuf_source_context_pb.SourceContext): void; - - hasSomeStruct(): boolean; - clearSomeStruct(): void; - getSomeStruct(): google_protobuf_struct_pb.Struct | undefined; - setSomeStruct(value?: google_protobuf_struct_pb.Struct): void; - - hasSomeTimestamp(): boolean; - clearSomeTimestamp(): void; - getSomeTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; - setSomeTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasSomeType(): boolean; - clearSomeType(): void; - getSomeType(): google_protobuf_type_pb.Type | undefined; - setSomeType(value?: google_protobuf_type_pb.Type): void; - - hasSomeDoubleValue(): boolean; - clearSomeDoubleValue(): void; - getSomeDoubleValue(): google_protobuf_wrappers_pb.DoubleValue | undefined; - setSomeDoubleValue(value?: google_protobuf_wrappers_pb.DoubleValue): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MySimple.AsObject; - static toObject(includeInstance: boolean, msg: MySimple): MySimple.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MySimple, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MySimple; - static deserializeBinaryFromReader(message: MySimple, reader: jspb.BinaryReader): MySimple; -} - -export namespace MySimple { - export type AsObject = { - myString: string, - myBool: boolean, - someLabelsList: Array, - someCodeGeneratorRequest?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.AsObject, - someAny?: google_protobuf_any_pb.Any.AsObject, - someMethod?: google_protobuf_api_pb.Method.AsObject, - someGeneratedCodeInfo?: google_protobuf_descriptor_pb.GeneratedCodeInfo.AsObject, - someDuration?: google_protobuf_duration_pb.Duration.AsObject, - someEmpty?: google_protobuf_empty_pb.Empty.AsObject, - someFieldMask?: google_protobuf_field_mask_pb.FieldMask.AsObject, - someSourceContext?: google_protobuf_source_context_pb.SourceContext.AsObject, - someStruct?: google_protobuf_struct_pb.Struct.AsObject, - someTimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, - someType?: google_protobuf_type_pb.Type.AsObject, - someDoubleValue?: google_protobuf_wrappers_pb.DoubleValue.AsObject, - } -} - diff --git a/examples/generated/proto/examplecom/simple_pb.flow.js b/examples/generated/proto/examplecom/simple_pb.flow.js new file mode 100644 index 00000000..3eb17f60 --- /dev/null +++ b/examples/generated/proto/examplecom/simple_pb.flow.js @@ -0,0 +1,118 @@ +// @flow +// package: examplecom +// file: proto/examplecom/simple.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_compiler_plugin_pb from "google-protobuf/google/protobuf/compiler/plugin_pb"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as google_protobuf_api_pb from "google-protobuf/google/protobuf/api_pb"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; +import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; +import * as google_protobuf_source_context_pb from "google-protobuf/google/protobuf/source_context_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as google_protobuf_type_pb from "google-protobuf/google/protobuf/type_pb"; +import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; + +export class MySimple$AsClass extends jspb.Message { + getMyString: () => string; + setMyString: (value: string) => void; + + getMyBool: () => boolean; + setMyBool: (value: boolean) => void; + + clearSomeLabelsList: () => void; + getSomeLabelsList: () => Array; + setSomeLabelsList: (value: Array) => void; + addSomeLabels: (value: string, index?: number) => string; + + hasSomeCodeGeneratorRequest: () => boolean; + clearSomeCodeGeneratorRequest: () => void; + getSomeCodeGeneratorRequest: () => ?google_protobuf_compiler_plugin_pb.CodeGeneratorRequest$AsClass; + setSomeCodeGeneratorRequest: (value?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest$AsClass) => void; + + hasSomeAny: () => boolean; + clearSomeAny: () => void; + getSomeAny: () => ?google_protobuf_any_pb.Any$AsClass; + setSomeAny: (value?: google_protobuf_any_pb.Any$AsClass) => void; + + hasSomeMethod: () => boolean; + clearSomeMethod: () => void; + getSomeMethod: () => ?google_protobuf_api_pb.Method$AsClass; + setSomeMethod: (value?: google_protobuf_api_pb.Method$AsClass) => void; + + hasSomeGeneratedCodeInfo: () => boolean; + clearSomeGeneratedCodeInfo: () => void; + getSomeGeneratedCodeInfo: () => ?google_protobuf_descriptor_pb.GeneratedCodeInfo$AsClass; + setSomeGeneratedCodeInfo: (value?: google_protobuf_descriptor_pb.GeneratedCodeInfo$AsClass) => void; + + hasSomeDuration: () => boolean; + clearSomeDuration: () => void; + getSomeDuration: () => ?google_protobuf_duration_pb.Duration$AsClass; + setSomeDuration: (value?: google_protobuf_duration_pb.Duration$AsClass) => void; + + hasSomeEmpty: () => boolean; + clearSomeEmpty: () => void; + getSomeEmpty: () => ?google_protobuf_empty_pb.Empty$AsClass; + setSomeEmpty: (value?: google_protobuf_empty_pb.Empty$AsClass) => void; + + hasSomeFieldMask: () => boolean; + clearSomeFieldMask: () => void; + getSomeFieldMask: () => ?google_protobuf_field_mask_pb.FieldMask$AsClass; + setSomeFieldMask: (value?: google_protobuf_field_mask_pb.FieldMask$AsClass) => void; + + hasSomeSourceContext: () => boolean; + clearSomeSourceContext: () => void; + getSomeSourceContext: () => ?google_protobuf_source_context_pb.SourceContext$AsClass; + setSomeSourceContext: (value?: google_protobuf_source_context_pb.SourceContext$AsClass) => void; + + hasSomeStruct: () => boolean; + clearSomeStruct: () => void; + getSomeStruct: () => ?google_protobuf_struct_pb.Struct$AsClass; + setSomeStruct: (value?: google_protobuf_struct_pb.Struct$AsClass) => void; + + hasSomeTimestamp: () => boolean; + clearSomeTimestamp: () => void; + getSomeTimestamp: () => ?google_protobuf_timestamp_pb.Timestamp$AsClass; + setSomeTimestamp: (value?: google_protobuf_timestamp_pb.Timestamp$AsClass) => void; + + hasSomeType: () => boolean; + clearSomeType: () => void; + getSomeType: () => ?google_protobuf_type_pb.Type$AsClass; + setSomeType: (value?: google_protobuf_type_pb.Type$AsClass) => void; + + hasSomeDoubleValue: () => boolean; + clearSomeDoubleValue: () => void; + getSomeDoubleValue: () => ?google_protobuf_wrappers_pb.DoubleValue$AsClass; + setSomeDoubleValue: (value?: google_protobuf_wrappers_pb.DoubleValue$AsClass) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => MySimple$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: MySimple$AsClass) => MySimple$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: MySimple$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => MySimple$AsClass; + static deserializeBinaryFromReader: (message: MySimple$AsClass, reader: jspb.BinaryReader) => MySimple$AsClass; +} + +export type MySimple$AsClass$AsObject = { + myString: string, + myBool: boolean, + someLabelsList: Array, + someCodeGeneratorRequest?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest$AsClass$AsObject, + someAny?: google_protobuf_any_pb.Any$AsClass$AsObject, + someMethod?: google_protobuf_api_pb.Method$AsClass$AsObject, + someGeneratedCodeInfo?: google_protobuf_descriptor_pb.GeneratedCodeInfo$AsClass$AsObject, + someDuration?: google_protobuf_duration_pb.Duration$AsClass$AsObject, + someEmpty?: google_protobuf_empty_pb.Empty$AsClass$AsObject, + someFieldMask?: google_protobuf_field_mask_pb.FieldMask$AsClass$AsObject, + someSourceContext?: google_protobuf_source_context_pb.SourceContext$AsClass$AsObject, + someStruct?: google_protobuf_struct_pb.Struct$AsClass$AsObject, + someTimestamp?: google_protobuf_timestamp_pb.Timestamp$AsClass$AsObject, + someType?: google_protobuf_type_pb.Type$AsClass$AsObject, + someDoubleValue?: google_protobuf_wrappers_pb.DoubleValue$AsClass$AsObject, +} + diff --git a/examples/generated/proto/examplecom/simple_service_pb.d.ts b/examples/generated/proto/examplecom/simple_service_pb.d.ts deleted file mode 100644 index 3f35e95b..00000000 --- a/examples/generated/proto/examplecom/simple_service_pb.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -// package: examplecom -// file: proto/examplecom/simple_service.proto - -import * as jspb from "google-protobuf"; -import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb"; -import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; - -export class UnaryRequest extends jspb.Message { - getSomeInt64(): number; - setSomeInt64(value: number): void; - - hasSomeTimestamp(): boolean; - clearSomeTimestamp(): void; - getSomeTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; - setSomeTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UnaryRequest.AsObject; - static toObject(includeInstance: boolean, msg: UnaryRequest): UnaryRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UnaryRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UnaryRequest; - static deserializeBinaryFromReader(message: UnaryRequest, reader: jspb.BinaryReader): UnaryRequest; -} - -export namespace UnaryRequest { - export type AsObject = { - someInt64: number, - someTimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class UnaryResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UnaryResponse.AsObject; - static toObject(includeInstance: boolean, msg: UnaryResponse): UnaryResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UnaryResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UnaryResponse; - static deserializeBinaryFromReader(message: UnaryResponse, reader: jspb.BinaryReader): UnaryResponse; -} - -export namespace UnaryResponse { - export type AsObject = { - } -} - -export class StreamRequest extends jspb.Message { - getSomeString(): string; - setSomeString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamRequest.AsObject; - static toObject(includeInstance: boolean, msg: StreamRequest): StreamRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamRequest; - static deserializeBinaryFromReader(message: StreamRequest, reader: jspb.BinaryReader): StreamRequest; -} - -export namespace StreamRequest { - export type AsObject = { - someString: string, - } -} - diff --git a/examples/generated/proto/examplecom/simple_service_pb.flow.js b/examples/generated/proto/examplecom/simple_service_pb.flow.js new file mode 100644 index 00000000..97429b52 --- /dev/null +++ b/examples/generated/proto/examplecom/simple_service_pb.flow.js @@ -0,0 +1,65 @@ +// @flow +// package: examplecom +// file: proto/examplecom/simple_service.proto + +import * as jspb from "google-protobuf"; +import * as proto_othercom_external_child_message_pb from "../../proto/othercom/external_child_message_pb.flow.js"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class UnaryRequest$AsClass extends jspb.Message { + getSomeInt64: () => number; + setSomeInt64: (value: number) => void; + + hasSomeTimestamp: () => boolean; + clearSomeTimestamp: () => void; + getSomeTimestamp: () => ?google_protobuf_timestamp_pb.Timestamp$AsClass; + setSomeTimestamp: (value?: google_protobuf_timestamp_pb.Timestamp$AsClass) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => UnaryRequest$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: UnaryRequest$AsClass) => UnaryRequest$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: UnaryRequest$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => UnaryRequest$AsClass; + static deserializeBinaryFromReader: (message: UnaryRequest$AsClass, reader: jspb.BinaryReader) => UnaryRequest$AsClass; +} + +export type UnaryRequest$AsClass$AsObject = { + someInt64: number, + someTimestamp?: google_protobuf_timestamp_pb.Timestamp$AsClass$AsObject, +} + +export class UnaryResponse$AsClass extends jspb.Message { + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => UnaryResponse$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: UnaryResponse$AsClass) => UnaryResponse$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: UnaryResponse$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => UnaryResponse$AsClass; + static deserializeBinaryFromReader: (message: UnaryResponse$AsClass, reader: jspb.BinaryReader) => UnaryResponse$AsClass; +} + +export type UnaryResponse$AsClass$AsObject = { +} + +export class StreamRequest$AsClass extends jspb.Message { + getSomeString: () => string; + setSomeString: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => StreamRequest$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: StreamRequest$AsClass) => StreamRequest$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: StreamRequest$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => StreamRequest$AsClass; + static deserializeBinaryFromReader: (message: StreamRequest$AsClass, reader: jspb.BinaryReader) => StreamRequest$AsClass; +} + +export type StreamRequest$AsClass$AsObject = { + someString: string, +} + diff --git a/examples/generated/proto/examplecom/simplevalue_pb.d.ts b/examples/generated/proto/examplecom/simplevalue_pb.d.ts deleted file mode 100644 index 79da301f..00000000 --- a/examples/generated/proto/examplecom/simplevalue_pb.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -// package: examplecom -// file: proto/examplecom/simplevalue.proto - -import * as jspb from "google-protobuf"; - -export class SimpleValue extends jspb.Message { - getFirstField(): string; - setFirstField(value: string): void; - - getSecondField(): number; - setSecondField(value: number): void; - - hasNumberValue(): boolean; - clearNumberValue(): void; - getNumberValue(): number; - setNumberValue(value: number): void; - - hasStringValue(): boolean; - clearStringValue(): void; - getStringValue(): string; - setStringValue(value: string): void; - - hasBoolValue(): boolean; - clearBoolValue(): void; - getBoolValue(): boolean; - setBoolValue(value: boolean): void; - - hasNumber2Value(): boolean; - clearNumber2Value(): void; - getNumber2Value(): number; - setNumber2Value(value: number): void; - - hasString2Value(): boolean; - clearString2Value(): void; - getString2Value(): string; - setString2Value(value: string): void; - - hasBool2Value(): boolean; - clearBool2Value(): void; - getBool2Value(): boolean; - setBool2Value(value: boolean): void; - - getKindCase(): SimpleValue.KindCase; - getAnotherCase(): SimpleValue.AnotherCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SimpleValue.AsObject; - static toObject(includeInstance: boolean, msg: SimpleValue): SimpleValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SimpleValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SimpleValue; - static deserializeBinaryFromReader(message: SimpleValue, reader: jspb.BinaryReader): SimpleValue; -} - -export namespace SimpleValue { - export type AsObject = { - firstField: string, - secondField: number, - numberValue: number, - stringValue: string, - boolValue: boolean, - number2Value: number, - string2Value: string, - bool2Value: boolean, - } - - export enum KindCase { - KIND_NOT_SET = 0, - NUMBER_VALUE = 3, - STRING_VALUE = 6, - BOOL_VALUE = 8, - } - - export enum AnotherCase { - ANOTHER_NOT_SET = 0, - NUMBER2_VALUE = 4, - STRING2_VALUE = 5, - BOOL2_VALUE = 7, - } -} - diff --git a/examples/generated/proto/examplecom/simplevalue_pb.flow.js b/examples/generated/proto/examplecom/simplevalue_pb.flow.js new file mode 100644 index 00000000..08cd8687 --- /dev/null +++ b/examples/generated/proto/examplecom/simplevalue_pb.flow.js @@ -0,0 +1,80 @@ +// @flow +// package: examplecom +// file: proto/examplecom/simplevalue.proto + +import * as jspb from "google-protobuf"; + +export class SimpleValue$AsClass extends jspb.Message { + getFirstField: () => string; + setFirstField: (value: string) => void; + + getSecondField: () => number; + setSecondField: (value: number) => void; + + hasNumberValue: () => boolean; + clearNumberValue: () => void; + getNumberValue: () => number; + setNumberValue: (value: number) => void; + + hasStringValue: () => boolean; + clearStringValue: () => void; + getStringValue: () => string; + setStringValue: (value: string) => void; + + hasBoolValue: () => boolean; + clearBoolValue: () => void; + getBoolValue: () => boolean; + setBoolValue: (value: boolean) => void; + + hasNumber2Value: () => boolean; + clearNumber2Value: () => void; + getNumber2Value: () => number; + setNumber2Value: (value: number) => void; + + hasString2Value: () => boolean; + clearString2Value: () => void; + getString2Value: () => string; + setString2Value: (value: string) => void; + + hasBool2Value: () => boolean; + clearBool2Value: () => void; + getBool2Value: () => boolean; + setBool2Value: (value: boolean) => void; + + getKindCase: () => $Values; + getAnotherCase: () => $Values; + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => SimpleValue$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: SimpleValue$AsClass) => SimpleValue$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: SimpleValue$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => SimpleValue$AsClass; + static deserializeBinaryFromReader: (message: SimpleValue$AsClass, reader: jspb.BinaryReader) => SimpleValue$AsClass; +} + +export type SimpleValue$AsClass$AsObject = { + firstField: string, + secondField: number, + numberValue: number, + stringValue: string, + boolValue: boolean, + number2Value: number, + string2Value: string, + bool2Value: boolean, +} + +export const SimpleValue$AsClass_KindCase = { + KIND_NOT_SET: 0, + NUMBER_VALUE: 3, + STRING_VALUE: 6, + BOOL_VALUE: 8, +} + +export const SimpleValue$AsClass_AnotherCase = { + ANOTHER_NOT_SET: 0, + NUMBER2_VALUE: 4, + STRING2_VALUE: 5, + BOOL2_VALUE: 7, +} + diff --git a/examples/generated/proto/examplecom/well_known_message_pb.d.ts b/examples/generated/proto/examplecom/well_known_message_pb.d.ts deleted file mode 100644 index a970a7e1..00000000 --- a/examples/generated/proto/examplecom/well_known_message_pb.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -// package: examplecom -// file: proto/examplecom/well_known_message.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; -import * as google_protobuf_api_pb from "google-protobuf/google/protobuf/api_pb"; -import * as google_protobuf_compiler_plugin_pb from "google-protobuf/google/protobuf/compiler/plugin_pb"; -import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; -import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; -import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; -import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; -import * as google_protobuf_source_context_pb from "google-protobuf/google/protobuf/source_context_pb"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as google_protobuf_type_pb from "google-protobuf/google/protobuf/type_pb"; -import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; - -export class WellKnownMessage extends jspb.Message { - hasMyCodeGeneratorRequest(): boolean; - clearMyCodeGeneratorRequest(): void; - getMyCodeGeneratorRequest(): google_protobuf_compiler_plugin_pb.CodeGeneratorRequest | undefined; - setMyCodeGeneratorRequest(value?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest): void; - - hasMyAny(): boolean; - clearMyAny(): void; - getMyAny(): google_protobuf_any_pb.Any | undefined; - setMyAny(value?: google_protobuf_any_pb.Any): void; - - hasMyMethod(): boolean; - clearMyMethod(): void; - getMyMethod(): google_protobuf_api_pb.Method | undefined; - setMyMethod(value?: google_protobuf_api_pb.Method): void; - - hasMyGeneratedCodeInfo(): boolean; - clearMyGeneratedCodeInfo(): void; - getMyGeneratedCodeInfo(): google_protobuf_descriptor_pb.GeneratedCodeInfo | undefined; - setMyGeneratedCodeInfo(value?: google_protobuf_descriptor_pb.GeneratedCodeInfo): void; - - hasMyDuration(): boolean; - clearMyDuration(): void; - getMyDuration(): google_protobuf_duration_pb.Duration | undefined; - setMyDuration(value?: google_protobuf_duration_pb.Duration): void; - - hasMyEmpty(): boolean; - clearMyEmpty(): void; - getMyEmpty(): google_protobuf_empty_pb.Empty | undefined; - setMyEmpty(value?: google_protobuf_empty_pb.Empty): void; - - hasMyFieldMask(): boolean; - clearMyFieldMask(): void; - getMyFieldMask(): google_protobuf_field_mask_pb.FieldMask | undefined; - setMyFieldMask(value?: google_protobuf_field_mask_pb.FieldMask): void; - - hasMySourceContext(): boolean; - clearMySourceContext(): void; - getMySourceContext(): google_protobuf_source_context_pb.SourceContext | undefined; - setMySourceContext(value?: google_protobuf_source_context_pb.SourceContext): void; - - hasMyStruct(): boolean; - clearMyStruct(): void; - getMyStruct(): google_protobuf_struct_pb.Struct | undefined; - setMyStruct(value?: google_protobuf_struct_pb.Struct): void; - - hasMyTimestamp(): boolean; - clearMyTimestamp(): void; - getMyTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; - setMyTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasMyType(): boolean; - clearMyType(): void; - getMyType(): google_protobuf_type_pb.Type | undefined; - setMyType(value?: google_protobuf_type_pb.Type): void; - - hasMyDoubleValue(): boolean; - clearMyDoubleValue(): void; - getMyDoubleValue(): google_protobuf_wrappers_pb.DoubleValue | undefined; - setMyDoubleValue(value?: google_protobuf_wrappers_pb.DoubleValue): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WellKnownMessage.AsObject; - static toObject(includeInstance: boolean, msg: WellKnownMessage): WellKnownMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WellKnownMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WellKnownMessage; - static deserializeBinaryFromReader(message: WellKnownMessage, reader: jspb.BinaryReader): WellKnownMessage; -} - -export namespace WellKnownMessage { - export type AsObject = { - myCodeGeneratorRequest?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.AsObject, - myAny?: google_protobuf_any_pb.Any.AsObject, - myMethod?: google_protobuf_api_pb.Method.AsObject, - myGeneratedCodeInfo?: google_protobuf_descriptor_pb.GeneratedCodeInfo.AsObject, - myDuration?: google_protobuf_duration_pb.Duration.AsObject, - myEmpty?: google_protobuf_empty_pb.Empty.AsObject, - myFieldMask?: google_protobuf_field_mask_pb.FieldMask.AsObject, - mySourceContext?: google_protobuf_source_context_pb.SourceContext.AsObject, - myStruct?: google_protobuf_struct_pb.Struct.AsObject, - myTimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, - myType?: google_protobuf_type_pb.Type.AsObject, - myDoubleValue?: google_protobuf_wrappers_pb.DoubleValue.AsObject, - } -} - diff --git a/examples/generated/proto/examplecom/well_known_message_pb.flow.js b/examples/generated/proto/examplecom/well_known_message_pb.flow.js new file mode 100644 index 00000000..c3617cb3 --- /dev/null +++ b/examples/generated/proto/examplecom/well_known_message_pb.flow.js @@ -0,0 +1,104 @@ +// @flow +// package: examplecom +// file: proto/examplecom/well_known_message.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as google_protobuf_api_pb from "google-protobuf/google/protobuf/api_pb"; +import * as google_protobuf_compiler_plugin_pb from "google-protobuf/google/protobuf/compiler/plugin_pb"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; +import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; +import * as google_protobuf_source_context_pb from "google-protobuf/google/protobuf/source_context_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as google_protobuf_type_pb from "google-protobuf/google/protobuf/type_pb"; +import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; + +export class WellKnownMessage$AsClass extends jspb.Message { + hasMyCodeGeneratorRequest: () => boolean; + clearMyCodeGeneratorRequest: () => void; + getMyCodeGeneratorRequest: () => ?google_protobuf_compiler_plugin_pb.CodeGeneratorRequest$AsClass; + setMyCodeGeneratorRequest: (value?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest$AsClass) => void; + + hasMyAny: () => boolean; + clearMyAny: () => void; + getMyAny: () => ?google_protobuf_any_pb.Any$AsClass; + setMyAny: (value?: google_protobuf_any_pb.Any$AsClass) => void; + + hasMyMethod: () => boolean; + clearMyMethod: () => void; + getMyMethod: () => ?google_protobuf_api_pb.Method$AsClass; + setMyMethod: (value?: google_protobuf_api_pb.Method$AsClass) => void; + + hasMyGeneratedCodeInfo: () => boolean; + clearMyGeneratedCodeInfo: () => void; + getMyGeneratedCodeInfo: () => ?google_protobuf_descriptor_pb.GeneratedCodeInfo$AsClass; + setMyGeneratedCodeInfo: (value?: google_protobuf_descriptor_pb.GeneratedCodeInfo$AsClass) => void; + + hasMyDuration: () => boolean; + clearMyDuration: () => void; + getMyDuration: () => ?google_protobuf_duration_pb.Duration$AsClass; + setMyDuration: (value?: google_protobuf_duration_pb.Duration$AsClass) => void; + + hasMyEmpty: () => boolean; + clearMyEmpty: () => void; + getMyEmpty: () => ?google_protobuf_empty_pb.Empty$AsClass; + setMyEmpty: (value?: google_protobuf_empty_pb.Empty$AsClass) => void; + + hasMyFieldMask: () => boolean; + clearMyFieldMask: () => void; + getMyFieldMask: () => ?google_protobuf_field_mask_pb.FieldMask$AsClass; + setMyFieldMask: (value?: google_protobuf_field_mask_pb.FieldMask$AsClass) => void; + + hasMySourceContext: () => boolean; + clearMySourceContext: () => void; + getMySourceContext: () => ?google_protobuf_source_context_pb.SourceContext$AsClass; + setMySourceContext: (value?: google_protobuf_source_context_pb.SourceContext$AsClass) => void; + + hasMyStruct: () => boolean; + clearMyStruct: () => void; + getMyStruct: () => ?google_protobuf_struct_pb.Struct$AsClass; + setMyStruct: (value?: google_protobuf_struct_pb.Struct$AsClass) => void; + + hasMyTimestamp: () => boolean; + clearMyTimestamp: () => void; + getMyTimestamp: () => ?google_protobuf_timestamp_pb.Timestamp$AsClass; + setMyTimestamp: (value?: google_protobuf_timestamp_pb.Timestamp$AsClass) => void; + + hasMyType: () => boolean; + clearMyType: () => void; + getMyType: () => ?google_protobuf_type_pb.Type$AsClass; + setMyType: (value?: google_protobuf_type_pb.Type$AsClass) => void; + + hasMyDoubleValue: () => boolean; + clearMyDoubleValue: () => void; + getMyDoubleValue: () => ?google_protobuf_wrappers_pb.DoubleValue$AsClass; + setMyDoubleValue: (value?: google_protobuf_wrappers_pb.DoubleValue$AsClass) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => WellKnownMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: WellKnownMessage$AsClass) => WellKnownMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: WellKnownMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => WellKnownMessage$AsClass; + static deserializeBinaryFromReader: (message: WellKnownMessage$AsClass, reader: jspb.BinaryReader) => WellKnownMessage$AsClass; +} + +export type WellKnownMessage$AsClass$AsObject = { + myCodeGeneratorRequest?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest$AsClass$AsObject, + myAny?: google_protobuf_any_pb.Any$AsClass$AsObject, + myMethod?: google_protobuf_api_pb.Method$AsClass$AsObject, + myGeneratedCodeInfo?: google_protobuf_descriptor_pb.GeneratedCodeInfo$AsClass$AsObject, + myDuration?: google_protobuf_duration_pb.Duration$AsClass$AsObject, + myEmpty?: google_protobuf_empty_pb.Empty$AsClass$AsObject, + myFieldMask?: google_protobuf_field_mask_pb.FieldMask$AsClass$AsObject, + mySourceContext?: google_protobuf_source_context_pb.SourceContext$AsClass$AsObject, + myStruct?: google_protobuf_struct_pb.Struct$AsClass$AsObject, + myTimestamp?: google_protobuf_timestamp_pb.Timestamp$AsClass$AsObject, + myType?: google_protobuf_type_pb.Type$AsClass$AsObject, + myDoubleValue?: google_protobuf_wrappers_pb.DoubleValue$AsClass$AsObject, +} + diff --git a/examples/generated/proto/orphan_pb.d.ts b/examples/generated/proto/orphan_pb.d.ts deleted file mode 100644 index 24026c84..00000000 --- a/examples/generated/proto/orphan_pb.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -// package: -// file: proto/orphan.proto - -import * as jspb from "google-protobuf"; - -export class OrphanMapMessage extends jspb.Message { - getPrimitiveIntsMap(): jspb.Map; - clearPrimitiveIntsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrphanMapMessage.AsObject; - static toObject(includeInstance: boolean, msg: OrphanMapMessage): OrphanMapMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrphanMapMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrphanMapMessage; - static deserializeBinaryFromReader(message: OrphanMapMessage, reader: jspb.BinaryReader): OrphanMapMessage; -} - -export namespace OrphanMapMessage { - export type AsObject = { - primitiveIntsMap: Array<[string, number]>, - } -} - -export class OrphanMessage extends jspb.Message { - getMyString(): string; - setMyString(value: string): void; - - getMyBool(): boolean; - setMyBool(value: boolean): void; - - getMyEnum(): OrphanEnum; - setMyEnum(value: OrphanEnum): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrphanMessage.AsObject; - static toObject(includeInstance: boolean, msg: OrphanMessage): OrphanMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrphanMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrphanMessage; - static deserializeBinaryFromReader(message: OrphanMessage, reader: jspb.BinaryReader): OrphanMessage; -} - -export namespace OrphanMessage { - export type AsObject = { - myString: string, - myBool: boolean, - myEnum: OrphanEnum, - } -} - -export class OrphanUnaryRequest extends jspb.Message { - getSomeInt64(): number; - setSomeInt64(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrphanUnaryRequest.AsObject; - static toObject(includeInstance: boolean, msg: OrphanUnaryRequest): OrphanUnaryRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrphanUnaryRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrphanUnaryRequest; - static deserializeBinaryFromReader(message: OrphanUnaryRequest, reader: jspb.BinaryReader): OrphanUnaryRequest; -} - -export namespace OrphanUnaryRequest { - export type AsObject = { - someInt64: number, - } -} - -export class OrphanStreamRequest extends jspb.Message { - getSomeString(): string; - setSomeString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrphanStreamRequest.AsObject; - static toObject(includeInstance: boolean, msg: OrphanStreamRequest): OrphanStreamRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrphanStreamRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrphanStreamRequest; - static deserializeBinaryFromReader(message: OrphanStreamRequest, reader: jspb.BinaryReader): OrphanStreamRequest; -} - -export namespace OrphanStreamRequest { - export type AsObject = { - someString: string, - } -} - -export enum OrphanEnum { - UNKNOWN = 0, - ONE = 1, - TWO = 2, -} - diff --git a/examples/generated/proto/orphan_pb.flow.js b/examples/generated/proto/orphan_pb.flow.js new file mode 100644 index 00000000..b65b8c3f --- /dev/null +++ b/examples/generated/proto/orphan_pb.flow.js @@ -0,0 +1,97 @@ +// @flow +// package: +// file: proto/orphan.proto + +import * as jspb from "google-protobuf"; + +export class OrphanMapMessage$AsClass extends jspb.Message { + getPrimitiveIntsMap: () => jspb.Map; + clearPrimitiveIntsMap: () => void; + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => OrphanMapMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: OrphanMapMessage$AsClass) => OrphanMapMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: OrphanMapMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => OrphanMapMessage$AsClass; + static deserializeBinaryFromReader: (message: OrphanMapMessage$AsClass, reader: jspb.BinaryReader) => OrphanMapMessage$AsClass; +} + +export type OrphanMapMessage$AsClass$AsObject = { + primitiveIntsMap: Array<[string, number]>, +} + +export class OrphanMessage$AsClass extends jspb.Message { + getMyString: () => string; + setMyString: (value: string) => void; + + getMyBool: () => boolean; + setMyBool: (value: boolean) => void; + + getMyEnum: () => $Values; + setMyEnum: (value: $Values) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => OrphanMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: OrphanMessage$AsClass) => OrphanMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: OrphanMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => OrphanMessage$AsClass; + static deserializeBinaryFromReader: (message: OrphanMessage$AsClass, reader: jspb.BinaryReader) => OrphanMessage$AsClass; +} + +export type OrphanMessage$AsClass$AsObject = { + myString: string, + myBool: boolean, + myEnum: $Values, +} + +export class OrphanUnaryRequest$AsClass extends jspb.Message { + getSomeInt64: () => number; + setSomeInt64: (value: number) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => OrphanUnaryRequest$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: OrphanUnaryRequest$AsClass) => OrphanUnaryRequest$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: OrphanUnaryRequest$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => OrphanUnaryRequest$AsClass; + static deserializeBinaryFromReader: (message: OrphanUnaryRequest$AsClass, reader: jspb.BinaryReader) => OrphanUnaryRequest$AsClass; +} + +export type OrphanUnaryRequest$AsClass$AsObject = { + someInt64: number, +} + +export class OrphanStreamRequest$AsClass extends jspb.Message { + getSomeString: () => string; + setSomeString: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => OrphanStreamRequest$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: OrphanStreamRequest$AsClass) => OrphanStreamRequest$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: OrphanStreamRequest$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => OrphanStreamRequest$AsClass; + static deserializeBinaryFromReader: (message: OrphanStreamRequest$AsClass, reader: jspb.BinaryReader) => OrphanStreamRequest$AsClass; +} + +export type OrphanStreamRequest$AsClass$AsObject = { + someString: string, +} + +export const OrphanEnum = Object.freeze({ + UNKNOWN: 0, + ONE: 1, + TWO: 2, +}) + +export const OrphanEnum$ReverseLookUp = Object.freeze({ + "0": "UNKNOWN", + "1": "ONE", + "2": "TWO", +}) + diff --git a/examples/generated/proto/othercom/external_child_message_pb.d.ts b/examples/generated/proto/othercom/external_child_message_pb.d.ts deleted file mode 100644 index 569e5857..00000000 --- a/examples/generated/proto/othercom/external_child_message_pb.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -// package: othercom -// file: proto/othercom/external_child_message.proto - -import * as jspb from "google-protobuf"; - -export class ExternalChildMessage extends jspb.Message { - getMyString(): string; - setMyString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExternalChildMessage.AsObject; - static toObject(includeInstance: boolean, msg: ExternalChildMessage): ExternalChildMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExternalChildMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExternalChildMessage; - static deserializeBinaryFromReader(message: ExternalChildMessage, reader: jspb.BinaryReader): ExternalChildMessage; -} - -export namespace ExternalChildMessage { - export type AsObject = { - myString: string, - } -} - diff --git a/examples/generated/proto/othercom/external_child_message_pb.flow.js b/examples/generated/proto/othercom/external_child_message_pb.flow.js new file mode 100644 index 00000000..f6833567 --- /dev/null +++ b/examples/generated/proto/othercom/external_child_message_pb.flow.js @@ -0,0 +1,24 @@ +// @flow +// package: othercom +// file: proto/othercom/external_child_message.proto + +import * as jspb from "google-protobuf"; + +export class ExternalChildMessage$AsClass extends jspb.Message { + getMyString: () => string; + setMyString: (value: string) => void; + + serializeBinary: () => Uint8Array; + toObject: (includeInstance?: boolean) => ExternalChildMessage$AsClass$AsObject; + static toObject: (includeInstance: boolean, msg: ExternalChildMessage$AsClass) => ExternalChildMessage$AsClass$AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter: (message: ExternalChildMessage$AsClass, writer: jspb.BinaryWriter) => void; + static deserializeBinary: (bytes: Uint8Array) => ExternalChildMessage$AsClass; + static deserializeBinaryFromReader: (message: ExternalChildMessage$AsClass, reader: jspb.BinaryReader) => ExternalChildMessage$AsClass; +} + +export type ExternalChildMessage$AsClass$AsObject = { + myString: string, +} + diff --git a/examples/generated/proto/othercom/external_enum_pb.d.ts b/examples/generated/proto/othercom/external_enum_pb.d.ts deleted file mode 100644 index e9e8b3af..00000000 --- a/examples/generated/proto/othercom/external_enum_pb.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// package: othercom -// file: proto/othercom/external_enum.proto - -import * as jspb from "google-protobuf"; - -export enum ExternalEnum { - DEFAULT = 0, - FIRST = 1, - SECOND = 2, -} - diff --git a/examples/generated/proto/othercom/external_enum_pb.flow.js b/examples/generated/proto/othercom/external_enum_pb.flow.js new file mode 100644 index 00000000..aa7b1539 --- /dev/null +++ b/examples/generated/proto/othercom/external_enum_pb.flow.js @@ -0,0 +1,18 @@ +// @flow +// package: othercom +// file: proto/othercom/external_enum.proto + +import * as jspb from "google-protobuf"; + +export const ExternalEnum = Object.freeze({ + DEFAULT: 0, + FIRST: 1, + SECOND: 2, +}) + +export const ExternalEnum$ReverseLookUp = Object.freeze({ + "0": "DEFAULT", + "1": "FIRST", + "2": "SECOND", +}) +