/*!
 * @author electricessence / https://github.com/electricessence/
 * Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md
 */
var __extends=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define(["require","exports"],e)}(function(e,t){"use strict";function n(e,t){return new o(e,t)}function i(e,t,n){return void 0===n&&(n=1/0),new c(e,t,n)}var r=function(){function e(){}return e.prototype.dispose=function(){this.cancel()},e}(),o=function(e){function t(n,i){e.call(this),i>=0||(i=0),this._id=setTimeout(t.handler,i,n,this)}return __extends(t,e),t.prototype.cancel=function(){var e=this._id;return e?(clearTimeout(e),this._id=0,!0):!1},t.handler=function(e,t){t.cancel(),e()},t}(r),c=function(e){function t(n,i,r){if(void 0===r&&(r=1/0),e.call(this),this._remaining=r,null===i||void 0===i)throw"'interval' must be a valid number.";if(0>i)throw"'interval' cannot be negative.";this._id=setInterval(t.handler,i,n,this)}return __extends(t,e),t.prototype.cancel=function(){var e=this._id;return e?(clearInterval(e),this._id=0,!0):!1},t.handler=function(e,t){--t._remaining||t.cancel(),e()},t}(r);Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,t.interval=i});
//# sourceMappingURL=defer.js.map
