brianchirls / proto-loader

Protocol Buffer loader module for webpack
27 stars 18 forks source link

Reflect enums? #15

Open dvisztempacct opened 6 years ago

dvisztempacct commented 6 years ago

Using grpc.load() which seems to use protobufjs 5 gives me access to my enum definitions.

For example, I can do something like this:

> grpc.load('assemblyline.proto').assemblyline.WidgetColor
{ WIDGET_COLOR_UNPAINTED: 0,
  WIDGET_COLOR_RED: 1,
  WIDGET_COLOR_GREEN: 2 }

But when I use @grpc/proto-loader I can't find the enums.