-
Notifications
You must be signed in to change notification settings - Fork 58
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
Examples for attributes in object style server implementation #108
Comments
Interesting. When I was writing the doc you mentioned, any attributes of any type you want could be added into the object style, as I remember It worked. Today I just tested it again with the codes in the Anyway, as we can see the behavior of Then I suggest you could use the class style, and put codes below in your class. [name: string]: grpc.UntypedHandleCall; |
Hmm, weird. I wonder what changed between your original test and now. Regardless, I found a way to add attributes to class based declarations. I'll put up a PR with that today or tomorrow. |
@paymog how did you resolve this. I have a class with attributes that implements gRPC service. I am running into this issue. |
@JigarJoshi Check the pr here: #109 , and doc: https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/v5.3.1/doc/server_impl_signature.md |
thanks! |
The write up on https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/v5.1.1/doc/server_impl_signature.md is super, super useful with the error about the
UntypedHandleCall
error. However, I'm finding it hard to figure out how to add extra attributes to the object style implementation. Here's an example of what I've tried. Unfortunately, it seems that added attributes to the object-style implementation ends up with the same errors as the class-based implementation:However, when compile this with
tsc
I see several errors:Is there another way to add attributes to the object style declaration as shown in https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/v5.1.1/doc/server_impl_signature.md#object-style? If so, how?
I'm using the following package versions:
The text was updated successfully, but these errors were encountered: