jaywalk
Version:
Runtime type validation
25 lines • 869 B
JavaScript
;
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var rule_1 = require('./rule');
var Omit = (function (_super) {
__extends(Omit, _super);
function Omit(options) {
if (options === void 0) { options = {}; }
_super.call(this, options);
this.type = 'Omit';
this._tests.push(omitTest);
}
Omit.prototype._extend = function (options) {
return _super.prototype._extend.call(this, options);
};
return Omit;
}(rule_1.Rule));
exports.Omit = Omit;
function omitTest(value, path, context, next) {
return next(value).then(function () { return undefined; });
}
//# sourceMappingURL=omit.js.map