THRIFT-3222 TypeScript: Fix enum generation (remove quotes)

This commit is contained in:
Felipe Barriga Richards 2015-06-30 17:02:23 -03:00 committed by Roger Meier
parent 01a77ab01e
commit 20a25519c4

View File

@ -439,7 +439,7 @@ void t_js_generator::generate_enum(t_enum* tenum) {
for (c_iter = constants.begin(); c_iter != constants.end(); ++c_iter) {
int value = (*c_iter)->get_value();
if (gen_ts_) {
f_types_ts_ << ts_indent() << "'" << (*c_iter)->get_name() << "' = " << value << "," << endl;
f_types_ts_ << ts_indent() << (*c_iter)->get_name() << " = " << value << "," << endl;
// add 'value: key' in addition to 'key: value' for TypeScript enums
f_types_ << indent() << "'" << value << "' : '" << (*c_iter)->get_name() << "'," << endl;
}