Correct minor error on ProtoEnum values array

The values field of the ProtoEnum interface should be an array not a single entry. This can be seen when using the Protobuf.js parser on enum fields where a file containing:

```

enum Priority {
    LOW = 1;
    MEDIUM = 2;
    HIGH = 3;
}
```

Is parsed to:

```
{ package: null,                                                             
  messages: [],                                                              
  enums:                                                                     
   [ { name: 'Priority',                                                     
       values:                                                               
        [ { name: 'LOW', id: 1 },                                            
          { name: 'MEDIUM', id: 2 },                                         
          { name: 'HIGH', id: 3 } ],                                         
       options: {} } ],                                                      
  imports: [],                                                               
  options: {},                                                               
  services: [] } 
```
This commit is contained in:
John Children
2016-10-07 17:07:44 +01:00
committed by GitHub
parent a0669ef32d
commit d0646a6650
+1 -1
View File
@@ -224,7 +224,7 @@ declare namespace ProtoBuf {
export interface ProtoEnum {
name: string;
values: ProtoEnumValue;
values: ProtoEnumValue[];
options: {[key: string]: any};
}