本文整理汇总了TypeScript中@0xproject/utils.intervalUtils.clearAsyncExcludingInterval方法的典型用法代码示例。如果您正苦于以下问题:TypeScript intervalUtils.clearAsyncExcludingInterval方法的具体用法?TypeScript intervalUtils.clearAsyncExcludingInterval怎么用?TypeScript intervalUtils.clearAsyncExcludingInterval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@0xproject/utils.intervalUtils
的用法示例。
在下文中一共展示了intervalUtils.clearAsyncExcludingInterval方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: _stopBlockAndLogStream
private _stopBlockAndLogStream(): void {
if (_.isUndefined(this._blockAndLogStreamerIfExists)) {
throw new Error(ZeroExError.SubscriptionNotFound);
}
this._blockAndLogStreamerIfExists.unsubscribeFromOnLogAdded(this._onLogAddedSubscriptionToken as string);
this._blockAndLogStreamerIfExists.unsubscribeFromOnLogRemoved(this._onLogRemovedSubscriptionToken as string);
intervalUtils.clearAsyncExcludingInterval(this._blockAndLogStreamIntervalIfExists as NodeJS.Timer);
delete this._blockAndLogStreamerIfExists;
}
示例2: async
async () => {
const [balance] = await this.getTokenBalanceAndAllowanceAsync(
this._userAddressIfExists,
token.address,
);
if (!balance.eq(currBalance)) {
intervalUtils.clearAsyncExcludingInterval(tokenPollInterval);
resolve(balance);
}
},
示例3: reject
(err: Error) => {
logUtils.log(`Polling tokenBalance failed: ${err}`);
intervalUtils.clearAsyncExcludingInterval(tokenPollInterval);
reject(err);
},
示例4: _stopEmittingNetworkConnectionAndUserBalanceStateAsync
private _stopEmittingNetworkConnectionAndUserBalanceStateAsync() {
if (!_.isUndefined(this._watchNetworkAndBalanceIntervalId)) {
intervalUtils.clearAsyncExcludingInterval(this._watchNetworkAndBalanceIntervalId);
}
}
示例5: stop
public stop() {
if (!_.isUndefined(this._queueIntervalIdIfExists)) {
intervalUtils.clearAsyncExcludingInterval(this._queueIntervalIdIfExists);
}
}