Files
DefinitelyTyped/protobufjs/test.proto
Ian Riley 5bec620cbb chore(test): Tests protobuf.d.ts
Applies runtime assertions to ensure that returned values adhere to their qualified type.
2015-06-08 11:34:08 -07:00

30 lines
678 B
Protocol Buffer

// Everything below is located in the js-namespace
package js;
// Represents a JavaScript value.
// Contains exactly one or zero fields.
message Value {
oneof type {
sint32 integer = 1;
double double = 2;
string string = 3;
bool boolean = 4;
bool null = 5;
Array array = 6;
Object object = 7;
// if none is set: undefined
}
}
// Represents a JavaScript array.
// Contains zero to N values.
message Array {
repeated Value values = 1;
}
// Represents a JavaScript object.
// Contains zero to N keys with associated values.
message Object {
repeated Value keys = 1;
repeated Value values = 2;
}