diff --git a/spec/observables/bindCallback-spec.ts b/spec/observables/bindCallback-spec.ts index ffa426aef4..cd1913aed4 100644 --- a/spec/observables/bindCallback-spec.ts +++ b/spec/observables/bindCallback-spec.ts @@ -106,12 +106,12 @@ describe('bindCallback', () => { const nextSpy = sinon.spy(); const throwSpy = sinon.spy(); const completeSpy = sinon.spy(); - let timeout: number; + let timeout: ReturnType; function callback(datum: number, cb: Function) { // Need to cb async in order for the unsub to trigger timeout = setTimeout(() => { cb(datum); - }); + }, 0); } const subscription = bindCallback(callback)(42) .subscribe(nextSpy, throwSpy, completeSpy); diff --git a/spec/observables/bindNodeCallback-spec.ts b/spec/observables/bindNodeCallback-spec.ts index 1e8e5d067b..d29b39473c 100644 --- a/spec/observables/bindNodeCallback-spec.ts +++ b/spec/observables/bindNodeCallback-spec.ts @@ -104,12 +104,12 @@ describe('bindNodeCallback', () => { const nextSpy = sinon.spy(); const throwSpy = sinon.spy(); const completeSpy = sinon.spy(); - let timeout: number; + let timeout: ReturnType; function callback(datum: number, cb: (err: any, n: number) => void) { // Need to cb async in order for the unsub to trigger timeout = setTimeout(() => { cb(null, datum); - }); + }, 0); } const subscription = bindNodeCallback(callback)(42) .subscribe(nextSpy, throwSpy, completeSpy);