muschema
Version:
Schemas for mudb
33 lines • 1.24 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var _number_1 = require("./_number");
var MuUint32 = (function (_super) {
__extends(MuUint32, _super);
function MuUint32(value) {
return _super.call(this, (value || 0) >>> 0, 'uint32') || this;
}
MuUint32.prototype.diff = function (base, target, stream) {
if ((base >>> 0) !== (target >>> 0)) {
stream.grow(4);
stream.writeUint32(target);
return true;
}
return false;
};
MuUint32.prototype.patch = function (base, stream) {
return stream.readUint32();
};
return MuUint32;
}(_number_1.MuNumber));
exports.MuUint32 = MuUint32;
//# sourceMappingURL=uint32.js.map