diff --git a/examples/grpc-proto-loader/client.ts b/examples/grpc-proto-loader/client.ts index 87d5cd4..889ecc7 100644 --- a/examples/grpc-proto-loader/client.ts +++ b/examples/grpc-proto-loader/client.ts @@ -4,7 +4,12 @@ import { ProtoGrpcType } from './proto/example'; import { ServerMessage } from './proto/example_package/ServerMessage'; const host = '0.0.0.0:9090'; -const packageDefinition = protoLoader.loadSync('./proto/example.proto'); +const packageDefinition = protoLoader.loadSync('./proto/example.proto', { + longs: String, + enums: String, + defaults: true, + oneofs: true, +}); const proto = grpc.loadPackageDefinition( packageDefinition ) as unknown as ProtoGrpcType; diff --git a/examples/grpc-proto-loader/server.ts b/examples/grpc-proto-loader/server.ts index 9a457d1..cff1ecd 100644 --- a/examples/grpc-proto-loader/server.ts +++ b/examples/grpc-proto-loader/server.ts @@ -53,7 +53,12 @@ const exampleServer: ExampleHandlers = { }; function getServer(): grpc.Server { - const packageDefinition = protoLoader.loadSync('./proto/example.proto'); + const packageDefinition = protoLoader.loadSync('./proto/example.proto', { + longs: String, + enums: String, + defaults: true, + oneofs: true, + }); const proto = grpc.loadPackageDefinition( packageDefinition ) as unknown as ProtoGrpcType;