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