3 ms·
Just to be clear (and I now remember more details), I wanted to do bs.new with bs.send, but it wouldn't work. I am going to try what you suggested, but keep in
by splintercell 8y ago
Just to be clear (and I now remember more details), I wanted to do bs.new with bs.send, but it wouldn't work.
I am going to try what you suggested, but keep in mind I did go to the slack channel and tried asking this, none of their solutions looked like yours. Either way, intuitively @bs.new and @bs.send should be able to work together.
https://github.com/BuckleScript/bucklescript/issues/2659 https://github.com/BuckleScript/bucklescript/issues/2659
- yawaramin 8y agoI see your problem (which is btw quite different from your original comment ;-) ). In a statically-typed language like Reason it's difficult to model dynamically-generated types like `hello_proto.Greeter`. One way is to use a functor ( https://v1.realworldocaml.org/v1/en/html/functors.html https://v1.realworldocaml.org/v1/en/html/functors.html ) but they have their limitations. This is why we have things like graphql_ppx which is a compiler extension to generate types from GraphQL schemas at compile-time. You'd need something like this (or, easier, a ReasonML-targeting gRPC/Protobuf client generator) to solve the issue brought up in GitHub.