Skip to content

Commit

Permalink
Fixup types for IBackburnerOptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Jan 19, 2018
1 parent 78b8fb1 commit 33755a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ export interface IBackburnerOptions {
defaultQueue?: string;
onBegin?: (currentInstance: DeferredActionQueues, previousInstance: DeferredActionQueues) => void;
onEnd?: (currentInstance: DeferredActionQueues, nextInstance: DeferredActionQueues) => void;
onError?: (error: any) => void;
onErrorTarget?: any;
onErrorMethod?: string;
mustYield?: () => boolean;
_buildPlatform: (flush: () => void) => IPlatform;
_buildPlatform?: (flush: () => void) => IPlatform;
}

export default class Backburner {
Expand Down Expand Up @@ -90,7 +93,7 @@ export default class Backburner {
private _autorun: number | null = null;
private _boundAutorunEnd: () => void;

constructor(queueNames: string[], options: IBackburnerOptions) {
constructor(queueNames: string[], options?: IBackburnerOptions) {
this.queueNames = queueNames;
this.options = options || {};
if (!this.options.defaultQueue) {
Expand Down

0 comments on commit 33755a5

Please sign in to comment.