Skip to content

Commit

Permalink
Merge pull request #4 from trxcllnt/jayphelps-timeout
Browse files Browse the repository at this point in the history
ugh. fixes lint issue from master merge (and force-pushed to commit --amend)
  • Loading branch information
trxcllnt authored Feb 7, 2017
2 parents 8513fd2 + b31438d commit 9e16f48
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
16 changes: 11 additions & 5 deletions spec/operators/timeout-spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import * as Rx from '../../dist/cjs/Rx';
import { expect } from 'chai';
declare const {hot, cold, asDiagram, expectObservable, expectSubscriptions};
import * as Rx from '../../dist/cjs/Rx';
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const rxTestScheduler: Rx.TestScheduler;
declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;

/** @test {timeout} */
Expand Down Expand Up @@ -125,9 +131,9 @@ describe('Observable.prototype.timeout', () => {
const result = e1
.lift({
call: (timeoutSubscriber, source) => {
const { action } = timeoutSubscriber; // get a ref to the action here
timeoutSubscriber.add(() => { // because it'll be null by the
if (!action.closed) { // time we get into this function.
const { action } = <any> timeoutSubscriber; // get a ref to the action here
timeoutSubscriber.add(() => { // because it'll be null by the
if (!action.closed) { // time we get into this function.
throw new Error('TimeoutSubscriber scheduled action wasn\'t canceled');
}
});
Expand Down
14 changes: 10 additions & 4 deletions spec/operators/timeoutWith-spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import * as Rx from '../../dist/cjs/Rx';
declare const {hot, cold, asDiagram, expectObservable, expectSubscriptions};
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports

declare const { asDiagram };
declare const rxTestScheduler: Rx.TestScheduler;
declare const hot: typeof marbleTestingSignature.hot;
declare const cold: typeof marbleTestingSignature.cold;
declare const expectObservable: typeof marbleTestingSignature.expectObservable;
declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions;

const Observable = Rx.Observable;

/** @test {timeoutWith} */
Expand Down Expand Up @@ -272,9 +278,9 @@ describe('Observable.prototype.timeoutWith', () => {
const result = e1
.lift({
call: (timeoutSubscriber, source) => {
const { action } = timeoutSubscriber; // get a ref to the action here
timeoutSubscriber.add(() => { // because it'll be null by the
if (!action.closed) { // time we get into this function.
const { action } = <any> timeoutSubscriber; // get a ref to the action here
timeoutSubscriber.add(() => { // because it'll be null by the
if (!action.closed) { // time we get into this function.
throw new Error('TimeoutSubscriber scheduled action wasn\'t canceled');
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/operator/timeoutWith.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Operator } from '../Operator';
import { Subscriber } from '../Subscriber';
import { IScheduler } from '../Scheduler';
import { async } from '../scheduler/async';
import { Subscription, TeardownLogic } from '../Subscription';
import { TeardownLogic } from '../Subscription';
import { Observable, ObservableInput } from '../Observable';
import { isDate } from '../util/isDate';
import { OuterSubscriber } from '../OuterSubscriber';
Expand Down

0 comments on commit 9e16f48

Please sign in to comment.