feat: support unwrapped value type rpc method arguments#979
feat: support unwrapped value type rpc method arguments#979programmador wants to merge 6 commits intostephenh:mainfrom
Conversation
|
Here's the link for prelude conversation #978 |
|
Seems like there's an interface trouble though somehow the code is being compiled and working in my project. export interface Clock {
Now(request: Empty): Promise<Timestamp>;
- NowString(request: StringValue): Promise<StringValue>;
- NowStringStream(request: Observable<StringValue>): Observable<StringValue>;
+ NowString(request: string | undefined): Promise<StringValue>;
+ NowStringStream(request: string | undefined): Observable<StringValue>;
NowBool(request: Empty): Promise<BoolValue>;
}It seems like the stream case is not covered correctly and I'm not sure whether it could be fixed at grpc-web level. Maybe types.ts changes are needed to implement rpc-level support for wrappers instead. |
|
Now I've moved the value type related branching lower into types.ts. |
|
The only problem still persists: incompatibility of |
|
Trying to implement smth like: instead of just inside of From this point I'm actually not sure how it's meant to be. From one side I've broken everything, from the other side why do we put that |
This part only adds support of unwrapped arguments, not return values.
Currently I do not have any value-type return types in my projects so I don't have an ability to check whether generated code does work if it contains such return values.
So this specific PR contains only stable code which I was able to check in a real project.
Either I'll create another PR when unwrapping of value-type return values is supported or just add commits to this one later.