Merge pull request #11882 from jchildren/patch-1

Correction to array type for ProtoEnum in ProtoBuf.js
This commit is contained in:
Arthur Ozga
2016-10-11 09:38:26 -07:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -180,7 +180,9 @@ function assertIsProtoEnum(pe: ProtoBuf.ProtoEnum, name: string) {
assert.ok("values" in pe, name + " should contain property values");
assert.ok("options" in pe, name + " should contain property options");
assertIsProtoEnumValue(pe.values, name + ".values");
for (var value in pe.values) {
assertIsProtoEnumValue(pe.values[value], name + ".values." + value);
}
}
function assertIsProtoEnumValue(pev: ProtoBuf.ProtoEnumValue, name: string) {

View File

@@ -224,7 +224,7 @@ declare namespace ProtoBuf {
export interface ProtoEnum {
name: string;
values: ProtoEnumValue;
values: ProtoEnumValue[];
options: {[key: string]: any};
}