-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
promiseclient missing from Typescript #580
Comments
@Globegitter I have the promise client defined when I generate my typescript definitions. The server definitions get put in a file named with the following format It contains the traditional callback interface and the promise based interface. What gets produced when you generate your typescript definitions? |
@yoitsro I am testing with the code at this repository: https://github.com/Globegitter/kotlin-react-grpc-example and getting a file /**
* @fileoverview gRPC-Web generated client stub for helloworld
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
import * as grpcWeb from 'grpc-web';
import {
HelloReply,
HelloRequest} from './helloworld_pb';
export class GreeterClient {
client_: grpcWeb.AbstractClientBase;
hostname_: string;
credentials_: null | { [index: string]: string; };
options_: null | { [index: string]: string; };
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: string; }) {
if (!options) options = {};
if (!credentials) credentials = {};
options['format'] = 'text';
this.client_ = new grpcWeb.GrpcWebClientBase(options);
this.hostname_ = hostname;
this.credentials_ = credentials;
this.options_ = options;
}
methodInfoSayHello = new grpcWeb.AbstractClientBase.MethodInfo(
HelloReply,
(request: HelloRequest) => {
return request.serializeBinary();
},
HelloReply.deserializeBinary
);
sayHello(
request: HelloRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.Error,
response: HelloReply) => void) {
return this.client_.rpcCall(
this.hostname_ +
'/helloworld.Greeter/SayHello',
request,
metadata || {},
this.methodInfoSayHello,
callback);
}
methodInfoSayHelloServerStreaming = new grpcWeb.AbstractClientBase.MethodInfo(
HelloReply,
(request: HelloRequest) => {
return request.serializeBinary();
},
HelloReply.deserializeBinary
);
sayHelloServerStreaming(
request: HelloRequest,
metadata?: grpcWeb.Metadata) {
return this.client_.serverStreaming(
this.hostname_ +
'/helloworld.Greeter/SayHelloServerStreaming',
request,
metadata || {},
this.methodInfoSayHelloServerStreaming);
}
} |
What command are you running to generate this? |
@yoitsro You can see it in the repository, it is auto-generated by gradle via: https://github.com/google/protobuf-gradle-plugin - here are the options specified: https://github.com/Globegitter/kotlin-react-grpc-example/blob/master/customer-service/app/build.gradle.kts#L98 What command are you running? Maybe I can then also give it a try manually and compare the outputs. |
Ah, hold on. I'm so sorry! I've been using the I just tried outputting TypeScript directly and you're right, there is no promise client yet. Again, I'm so sorry! |
Just trying out the typescript generation and it seems like the promiseclient is missing there. Would be great to have for parity.
The text was updated successfully, but these errors were encountered: