Closed tonyneel923 closed 3 years ago
After more digging this only happens when return types use stream. Is there any wah to not use an external lib to represent stream in typescript? Sorry new to grpc so not sure.
@tonyneel923 "not use an external lib to represent stream" right, there is not a built-in stream type, so we have to pull in a 3rd party library. Also since ts-proto just does codegen, it's not ts-proto really deciding whether to use rxjs or not, it's the nestjs and/or grpc-web runtimes that choose what streaming library they use, and then ts-proto just outputs code that uses the appropriate type.
When I pass returnObservable=false into the options flag it still uses observable.
Example command:
protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=returnObservable=false,outputEncodeMethods=false,outputJsonMethods=false,outputClientImpl=false --ts_proto_out=typescript ${path}