You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sync(request: DeepPartial<Observable<SyncReq>>,// [1]metadata?: grpc.Metadata,): Observable<StreamItem>{returnthis.rpc.invoke(FooSyncDesc,Observable<SyncReq>.fromPartial(request),// [2], this line is problematic to tscmetadata,);}
I'm also using --ts_proto_opt=outputClientImpl=grpc-web, which gives me this definition for invoke:
Disclaimer, we don't actually use these methods on our web client (at least yet), but they cause our tsc checks to fail.
Also, I'm unfamiliar with rxjs observables, but from a cursory glance at their docs and referring to the lines I commented with // [1], // [2], and // [3], it's unclear to me that the generated Sync method is correct...
because of the object spread in // [3], it leads me to believe that:
it seems like // [2] should be something like new Observable(SyncReq.fromPartial(request)) (i know that's not how it's constructed, but still) OR just SyncReq.fromPartial(request)
either way, those two suggestions fail because request is a deep partial Observable, instead of just a SyncReq... there's no .fromPartial() method on an observable object...
is this by design?
also, it appears the output is incorrectly generated, or at least something that
tsc
hates, e.g.:Given:
Outputs:
I'm also using
--ts_proto_opt=outputClientImpl=grpc-web
, which gives me this definition forinvoke
:Disclaimer, we don't actually use these methods on our web client (at least yet), but they cause our
tsc
checks to fail.Also, I'm unfamiliar with rxjs observables, but from a cursory glance at their docs and referring to the lines I commented with
// [1]
,// [2]
, and// [3]
, it's unclear to me that the generated Sync method is correct...because of the object spread in
// [3]
, it leads me to believe that:it seems like
// [2]
should be something likenew Observable(SyncReq.fromPartial(request))
(i know that's not how it's constructed, but still) OR justSyncReq.fromPartial(request)
either way, those two suggestions fail because
request
is a deep partial Observable, instead of just aSyncReq
... there's no.fromPartial()
method on an observable object...ts_proto version: latest (1.82.2)
node version: lts/* (14.17.3)
The text was updated successfully, but these errors were encountered: