@whisklabs/grpc
Version:
gRPC generator and http library for typescript
25 lines • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WrapperStruct = exports.MapStruct = exports.SHIFT_RIGHT_32 = exports.SHIFT_LEFT_32 = exports.Fixed32 = exports.Bytes = exports.Fixed64 = exports.Varint = void 0;
exports.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum
exports.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64
exports.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields
exports.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32
exports.SHIFT_LEFT_32 = (1 << 16) * (1 << 16);
exports.SHIFT_RIGHT_32 = 1 / exports.SHIFT_LEFT_32;
function MapStruct(item) {
return function MapValue() {
return [
[1, 'key', item[1], 1],
[2, 'value', item[2], 1],
];
};
}
exports.MapStruct = MapStruct;
function WrapperStruct(value) {
return function Wrapper() {
return [[1, 'value', value, 1]];
};
}
exports.WrapperStruct = WrapperStruct;
//# sourceMappingURL=constant.js.map