diff --git a/examples/generated/proto/examplecom/simple_service_pb_service.d.ts b/examples/generated/proto/examplecom/simple_service_pb_service.d.ts index e925bea3..cb4ac5cb 100644 --- a/examples/generated/proto/examplecom/simple_service_pb_service.d.ts +++ b/examples/generated/proto/examplecom/simple_service_pb_service.d.ts @@ -62,7 +62,7 @@ export class SimpleService { export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } export type Status = { details: string, code: number; metadata: grpc.Metadata } -export type ServiceClientOptions = { transport: grpc.TransportConstructor; debug?: boolean } +export type ServiceClientOptions = { transport?: grpc.TransportConstructor; debug?: boolean } interface UnaryResponse { cancel(): void; diff --git a/examples/generated/proto/orphan_pb_service.d.ts b/examples/generated/proto/orphan_pb_service.d.ts index c18e0ee8..ab177ea5 100644 --- a/examples/generated/proto/orphan_pb_service.d.ts +++ b/examples/generated/proto/orphan_pb_service.d.ts @@ -30,7 +30,7 @@ export class OrphanService { export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } export type Status = { details: string, code: number; metadata: grpc.Metadata } -export type ServiceClientOptions = { transport: grpc.TransportConstructor; debug?: boolean } +export type ServiceClientOptions = { transport?: grpc.TransportConstructor; debug?: boolean } interface UnaryResponse { cancel(): void; diff --git a/src/service/grpcweb.ts b/src/service/grpcweb.ts index 79f18dda..f3eba851 100644 --- a/src/service/grpcweb.ts +++ b/src/service/grpcweb.ts @@ -204,7 +204,7 @@ function generateTypescriptDefinition(fileDescriptor: FileDescriptorProto, expor printer.printLn(`export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }`); printer.printLn(`export type Status = { details: string, code: number; metadata: grpc.Metadata }`); - printer.printLn(`export type ServiceClientOptions = { transport: grpc.TransportConstructor; debug?: boolean }`); + printer.printLn(`export type ServiceClientOptions = { transport?: grpc.TransportConstructor; debug?: boolean }`); printer.printEmptyLn(); printer.printLn("interface UnaryResponse {"); printer.printIndentedLn("cancel(): void;");