Usage with plain javascript objects and typescript types #1016
Replies: 1 comment 4 replies
-
I dug a bit into the source and found this: Here it seems there is a So my conclusion for now it that this |
Beta Was this translation helpful? Give feedback.
-
We currently use ts-proto to generate types and then just use plain object that follows the structure of those types. We prefer this model to generating runnable code such as classes. Today we implement our own framework for transfering the seriazlied proto data with an abstraction for transport.
When I saw the connect protocol that piqued my interest as it seems similar to what we are already doing, altough in a more standardized form. So I'm starting to research how we may use the connect protocol. The first question I got is if there is some way to use
@connectrpc/connect
without the requirement to generate classes? We still would like to use plain objects and only generate types instead of runnable code like we do today with ts-proto. I cannot seem to find a full doc on the API for the package other than some examples that all seem to use generated classes but maybe I am not looking in the correct place?Beta Was this translation helpful? Give feedback.
All reactions