You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import * as jspb from "google-protobuf"
export enum Test {
Prop1 = 0,
PROP2 = 1,
}
together with the js file
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.testEnum.Test', null, global);
/**
* @enum {number}
*/
proto.testEnum.Test = {
PROP1: 0,
PROP2: 1
};
goog.object.extend(exports, proto.testEnum);
Trying to access Prop1 therefore leads to run-time errors.
The text was updated successfully, but these errors were encountered:
You can avoid the problem by following the all caps style for enums, as outlined in the style guide for Protocol Buffers, but the system should behave differently when the style is not followed instead of just silently breaking.
The proto file
compiles to the d.ts file
together with the js file
Trying to access Prop1 therefore leads to run-time errors.
The text was updated successfully, but these errors were encountered: