Skip to content

Commit

Permalink
remove deprecated deferOnce, defer and setTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bekzod committed Dec 4, 2017
1 parent 838c462 commit 3ede4f7
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export default class Backburner {
@return instantiated class DeferredActionQueues
*/
public begin(): DeferredActionQueues {
let options = this.options;
let previousInstance = this.currentInstance;
let current;

Expand All @@ -133,7 +132,7 @@ export default class Backburner {
if (previousInstance !== null) {
this.instanceStack.push(previousInstance);
}
current = this.currentInstance = new DeferredActionQueues(this.queueNames, options);
current = this.currentInstance = new DeferredActionQueues(this.queueNames, this.options);
this._trigger('begin', current, previousInstance);
}

Expand Down Expand Up @@ -236,14 +235,6 @@ export default class Backburner {
return this._join(target, method, args);
}

/**
* @deprecated please use schedule instead.
*/
public defer(queueName: string, ...args);
public defer() {
return this.schedule(...arguments);
}

/**
* Schedule the passed function to run inside the specified queue.
*/
Expand All @@ -270,14 +261,6 @@ export default class Backburner {
return this._ensureInstance().schedule(queueName, null, iteratorDrain, [iterable], false, stack);
}

/**
* @deprecated please use scheduleOnce instead.
*/
public deferOnce(queueName: string, ...args);
public deferOnce() {
return this.scheduleOnce(...arguments);
}

/**
* Schedule the passed function to run once inside the specified queue.
*/
Expand All @@ -291,14 +274,6 @@ export default class Backburner {
return this._ensureInstance().schedule(queueName, target, method, args, true, stack);
}

/**
* @deprecated use later instead.
*/
public setTimeout(...args);
public setTimeout() {
return this.later(...arguments);
}

public later()
public later(...args) {
let length = args.length;
Expand Down Expand Up @@ -489,7 +464,7 @@ export default class Backburner {
return this._cancelItem(timer, this._throttlers) || this._cancelItem(timer, this._debouncees);
} else if (timerType === 'function') { // we're cancelling a setTimeout
return this._cancelLaterTimer(timer);
} else if (timerType === 'object' && timer.queue && timer.method) { // we're cancelling a deferOnce
} else if (timerType === 'object' && timer.queue && timer.method) { // we're cancelling a scheduleOnce
return timer.queue.cancel(timer);
}

Expand Down

0 comments on commit 3ede4f7

Please sign in to comment.