protobuf-ts
protobuf-ts copied to clipboard
Automatic message registry
It will be hugely beneficial if we can create a registry of all proto messages automatically so that we don't need to pass typeRegistry
for the Any
type which is kind of annoying and hard to maintain.
The protobuf golang implementation does exactly this, whenever a proto generated file is imported it has line at the top of the file, something like:
registry.Register("ProtoMessage", ProtoMessage);
in fact the Any
types are always automatically handled as far as the file is imported (and registered).
Definately a great development experience.
We can of course keep the typeRegistry
option if we ever need to pass those manually in, otherwise it passes the registry by default