define(["require","exports","tslib","../deps/bluebird_fork"],function(e,t,o,i){"use strict";var n,r,u,d,s,c,f;function v(){var e;(s=void 0)===c&&(e=r,r=void 0,e())}Object.defineProperty(t,"__esModule",{value:!0}),i=o.__importDefault(i);Object.defineProperty(p.prototype,"cancellationToken",{get:function(){return n!==this?f=void 0===f?i.default.resolve():f:d=void 0===d?new i.default(function(e){return u=e}):d},enumerable:!0,configurable:!0}),p.prototype.start=function(e,t){n!==this&&"function"==typeof t&&(void 0!==n&&n.reset(),n=this,r=t,s=setTimeout(v,e))},p.prototype.reset=function(){n===this&&((n=r=void 0)!==s&&(clearTimeout(s),s=void 0),void 0!==c&&(clearTimeout(c),c=void 0),void 0!==u&&(u(),d=u=void 0))},p.prototype.resume=function(e){n===this&&(void 0!==r&&("function"==typeof e&&(r=e),void 0===s&&(s=setTimeout(v))),void 0!==c&&(clearTimeout(c),c=void 0))},p.prototype.suspend=function(){var e=this;n===this&&void 0===c&&(c=setTimeout(function(){return e.reset()}))},o=p;function p(){}t.ExclusiveTimer=o});