diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..bdf28e582a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# no eol conversions! +* -text diff --git a/.markdown-doctest-setup.js b/.markdown-doctest-setup.js index 6afba751e5..9319f613d6 100644 --- a/.markdown-doctest-setup.js +++ b/.markdown-doctest-setup.js @@ -29,6 +29,7 @@ module.exports = { } } }, + emptySubs: marbleTesting.emptySubs, hot: marbleTesting.hot, cold: marbleTesting.cold, expectObservable: marbleTesting.expectObservable, diff --git a/dangerfile.js b/dangerfile.js index 95d17170be..4a2d0b1167 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -7,10 +7,10 @@ var validateMessage = require('validate-commit-msg'); //simple regex matcher to detect usage of helper function and its type signature var hotMatch = /\bhot\(/gi; -var hotSignatureMatch = /\bdeclare const hot: typeof/gi; +var hotSignatureMatch = /\bimport \{.*?hot.*?\} from '.*?\/helpers\/marble-testing'/gi; var coldMatch = /\bcold\(/gi; -var coldSignatureMatch = /\bdeclare const cold: typeof/gi; +var coldSignatureMatch = /\bimport \{.*?cold.*?\} from '.*?\/helpers\/marble-testing'/gi; var errorCount = 0; diff --git a/spec/Notification-spec.ts b/spec/Notification-spec.ts index faeb92d2ff..b59f1d6ff3 100644 --- a/spec/Notification-spec.ts +++ b/spec/Notification-spec.ts @@ -1,8 +1,7 @@ import { expect } from 'chai'; import * as Rx from '../src/Rx'; -import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { expectObservable } from './helpers/marble-testing'; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; const Notification = Rx.Notification; /** @test {Notification} */ diff --git a/spec/Observable-spec.ts b/spec/Observable-spec.ts index 27f0bed29f..1de21a4bee 100644 --- a/spec/Observable-spec.ts +++ b/spec/Observable-spec.ts @@ -3,15 +3,12 @@ import * as sinon from 'sinon'; import * as Rx from '../src/Rx'; import { Observer } from './../src/internal/Observer'; import { TeardownLogic } from '../src/internal/Subscription'; -import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { cold, expectObservable, expectSubscriptions } from './helpers/marble-testing'; import { map } from '../src/internal/operators/map'; //tslint:disable-next-line require('./helpers/test-helper'); declare const asDiagram: any, rxTestScheduler: any; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; const Observable = Rx.Observable; diff --git a/spec/Subject-spec.ts b/spec/Subject-spec.ts index 8bc1e19d19..2ea12c3289 100644 --- a/spec/Subject-spec.ts +++ b/spec/Subject-spec.ts @@ -1,10 +1,6 @@ import { expect } from 'chai'; import * as Rx from '../src/Rx'; -import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; +import { hot, expectObservable } from './helpers/marble-testing'; const Subject = Rx.Subject; const Observable = Rx.Observable; diff --git a/spec/helpers/marble-testing.ts b/spec/helpers/marble-testing.ts index 4994b16e6d..cfc6149a7d 100644 --- a/spec/helpers/marble-testing.ts +++ b/spec/helpers/marble-testing.ts @@ -8,13 +8,19 @@ declare const global: any; export const rxTestScheduler: TestScheduler = global.rxTestScheduler; -export function hot(marbles: string, values?: any, error?: any): HotObservable { +export const emptySubs: any[] = []; + +export function hot(marbles: string, values?: void, error?: any): HotObservable; +export function hot(marbles: string, values?: { [index: string]: V; }, error?: any): HotObservable; +export function hot(marbles: string, values?: { [index: string]: V; } | void, error?: any): HotObservable { if (!global.rxTestScheduler) { throw 'tried to use hot() in async test'; } return global.rxTestScheduler.createHotObservable.apply(global.rxTestScheduler, arguments); } +export function cold(marbles: string, values?: void, error?: any): ColdObservable; +export function cold(marbles: string, values?: { [index: string]: V; }, error?: any): ColdObservable; export function cold(marbles: string, values?: any, error?: any): ColdObservable { if (!global.rxTestScheduler) { throw 'tried to use cold() in async test'; diff --git a/spec/observables/SubscribeOnObservable-spec.ts b/spec/observables/SubscribeOnObservable-spec.ts index 9a1460b548..cb37bd1167 100644 --- a/spec/observables/SubscribeOnObservable-spec.ts +++ b/spec/observables/SubscribeOnObservable-spec.ts @@ -2,11 +2,8 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; import * as Rx from '../../src/Rx'; import { SubscribeOnObservable } from '../../src/internal/observable/SubscribeOnObservable'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; declare const rxTestScheduler: Rx.TestScheduler; describe('SubscribeOnObservable', () => { diff --git a/spec/observables/combineLatest-spec.ts b/spec/observables/combineLatest-spec.ts index c743d3625f..960fdf78ed 100644 --- a/spec/observables/combineLatest-spec.ts +++ b/spec/observables/combineLatest-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; const Observable = Rx.Observable; const queueScheduler = Rx.Scheduler.queue; @@ -516,7 +512,7 @@ describe('Observable.combineLatest', () => { let a: Promise[]; let o1: Rx.Observable = Observable.combineLatest(a); let o2: Rx.Observable = Observable.combineLatest(...a); - let o3: Rx.Observable = Observable.combineLatest(a, (...x) => x.length); + let o3: Rx.Observable = Observable.combineLatest(a, (...x: any[]) => x.length); /* tslint:enable:no-unused-variable */ }); @@ -525,7 +521,7 @@ describe('Observable.combineLatest', () => { let a: Rx.Observable[]; let o1: Rx.Observable = Observable.combineLatest(a); let o2: Rx.Observable = Observable.combineLatest(...a); - let o3: Rx.Observable = Observable.combineLatest(a, (...x) => x.length); + let o3: Rx.Observable = Observable.combineLatest(a, (...x: any[]) => x.length); /* tslint:enable:no-unused-variable */ }); diff --git a/spec/observables/concat-spec.ts b/spec/observables/concat-spec.ts index 0da4bb15b7..557059f658 100644 --- a/spec/observables/concat-spec.ts +++ b/spec/observables/concat-spec.ts @@ -1,12 +1,7 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; import { lowerCaseO } from '../helpers/test-helper'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, emptySubs, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; const Observable = Rx.Observable; const queueScheduler = Rx.Scheduler.queue; @@ -88,7 +83,7 @@ describe('Observable.concat', () => { const e1 = cold('-'); const e1subs = '^'; const e2 = cold('--|'); - const e2subs = []; + const e2subs = emptySubs; const expected = '-'; expectObservable(Observable.concat(e1, e2)).toBe(expected); @@ -112,7 +107,7 @@ describe('Observable.concat', () => { const e1 = cold('-'); const e1subs = '^'; const e2 = cold('-'); - const e2subs = []; + const e2subs = emptySubs; const expected = '-'; expectObservable(Observable.concat(e1, e2)).toBe(expected); @@ -136,7 +131,7 @@ describe('Observable.concat', () => { const e1 = cold('---#'); const e1subs = '^ !'; const e2 = cold('----|'); - const e2subs = []; + const e2subs = emptySubs; const expected = '---#'; expectObservable(Observable.concat(e1, e2)).toBe(expected); @@ -148,7 +143,7 @@ describe('Observable.concat', () => { const e1 = cold('---#'); const e1subs = '^ !'; const e2 = cold('------#'); - const e2subs = []; + const e2subs = emptySubs; const expected = '---#'; expectObservable(Observable.concat(e1, e2)).toBe(expected); @@ -197,7 +192,7 @@ describe('Observable.concat', () => { const e1 = cold('-'); const e1subs = '^'; const e2 = cold('--a--|'); - const e2subs = []; + const e2subs = emptySubs; const expected = '-'; expectObservable(Observable.concat(e1, e2)).toBe(expected); @@ -234,7 +229,7 @@ describe('Observable.concat', () => { const e1 = cold('--#'); const e1subs = '^ !'; const e2 = cold('----a--|'); - const e2subs = []; + const e2subs = emptySubs; const expected = '--#'; expectObservable(Observable.concat(e1, e2)).toBe(expected); diff --git a/spec/observables/defer-spec.ts b/spec/observables/defer-spec.ts index 16a3fabc30..93bac17bf7 100644 --- a/spec/observables/defer-spec.ts +++ b/spec/observables/defer-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports import { defer } from '../../src/'; import { Observable } from '../../src'; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const asDiagram: any; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; /** @test {defer} */ describe('defer', () => { diff --git a/spec/observables/dom/ajax-spec.ts b/spec/observables/dom/ajax-spec.ts index d865f11453..58dcbb28b7 100644 --- a/spec/observables/dom/ajax-spec.ts +++ b/spec/observables/dom/ajax-spec.ts @@ -230,7 +230,7 @@ describe('Observable.ajax', () => { }); it('should fail on 404', () => { - let error; + let error: any; const obj = { url: '/flibbertyJibbet', normalizeError: (e: any, xhr: any, type: any) => { diff --git a/spec/observables/empty-spec.ts b/spec/observables/empty-spec.ts index bd450f631a..ed20c3087c 100644 --- a/spec/observables/empty-spec.ts +++ b/spec/observables/empty-spec.ts @@ -1,10 +1,9 @@ -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { expectObservable } from '../helpers/marble-testing'; import { empty } from '../../src/'; import { EMPTY } from '../../src'; import { expect } from 'chai'; declare const asDiagram: any; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; declare const rxTestScheduler: any; /** @test {empty} */ diff --git a/spec/observables/forkJoin-spec.ts b/spec/observables/forkJoin-spec.ts index 73b8b14075..98f4c1f531 100644 --- a/spec/observables/forkJoin-spec.ts +++ b/spec/observables/forkJoin-spec.ts @@ -1,13 +1,10 @@ import { expect } from 'chai'; import { Observable, forkJoin, of } from '../../src'; import { lowerCaseO } from '../helpers/test-helper'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const type: any; -declare const asDiagram: any; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; /** @test {forkJoin} */ describe('forkJoin', () => { diff --git a/spec/observables/fromEvent-spec.ts b/spec/observables/fromEvent-spec.ts index 66f463d442..b1de0912fb 100644 --- a/spec/observables/fromEvent-spec.ts +++ b/spec/observables/fromEvent-spec.ts @@ -1,9 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { expectObservable } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/observables/fromEventPattern-spec.ts b/spec/observables/fromEventPattern-spec.ts index a0f87d9edd..642baf437e 100644 --- a/spec/observables/fromEventPattern-spec.ts +++ b/spec/observables/fromEventPattern-spec.ts @@ -2,11 +2,9 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; import * as Rx from '../../src/Rx'; import { noop } from '../../src/internal/util/noop'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { asDiagram }; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; +import { expectObservable } from '../helpers/marble-testing'; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/observables/generate-spec.ts b/spec/observables/generate-spec.ts index 30b1f88c94..4bd53e960f 100644 --- a/spec/observables/generate-spec.ts +++ b/spec/observables/generate-spec.ts @@ -2,7 +2,8 @@ import * as Rx from '../../src/Rx'; import '../../src/add/observable/generate'; import { TestScheduler } from '../../src/internal/testing/TestScheduler'; import { expect } from 'chai'; -declare const {asDiagram, expectObservable}; +import { expectObservable } from '../helpers/marble-testing'; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: TestScheduler; const Observable = Rx.Observable; diff --git a/spec/observables/if-spec.ts b/spec/observables/if-spec.ts index 22ca35e49a..2ac514269e 100644 --- a/spec/observables/if-spec.ts +++ b/spec/observables/if-spec.ts @@ -1,8 +1,6 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const expectObservable: typeof marbleTestingSignature.expectObservable; +import { expectObservable } from '../helpers/marble-testing'; const Observable = Rx.Observable; diff --git a/spec/observables/interval-spec.ts b/spec/observables/interval-spec.ts index 200f404022..d44ecaab8a 100644 --- a/spec/observables/interval-spec.ts +++ b/spec/observables/interval-spec.ts @@ -1,12 +1,11 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { expectObservable } from '../helpers/marble-testing'; import { asapScheduler, Observable, animationFrameScheduler, queueScheduler } from '../../src'; import { TestScheduler } from '../../src/testing'; import { interval } from '../../src/'; declare const asDiagram: any; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; declare const rxTestScheduler: TestScheduler; /** @test {interval} */ diff --git a/spec/observables/merge-spec.ts b/spec/observables/merge-spec.ts index 2147d2849e..bba94bf433 100644 --- a/spec/observables/merge-spec.ts +++ b/spec/observables/merge-spec.ts @@ -1,12 +1,7 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; import { lowerCaseO } from '../helpers/test-helper'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/observables/never-spec.ts b/spec/observables/never-spec.ts index ee158b095f..bfeda333a3 100644 --- a/spec/observables/never-spec.ts +++ b/spec/observables/never-spec.ts @@ -1,9 +1,8 @@ import { never } from '../../src/'; import { expect } from 'chai'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { expectObservable } from '../helpers/marble-testing'; declare const asDiagram: any; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; /** @test {never} */ describe('never', () => { diff --git a/spec/observables/of-spec.ts b/spec/observables/of-spec.ts index a0a78a1fb1..dcfd73722f 100644 --- a/spec/observables/of-spec.ts +++ b/spec/observables/of-spec.ts @@ -1,9 +1,10 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; import { empty } from '../../src/internal/observable/empty'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports -declare const asDiagram: any; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; +import { expectObservable } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; + declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/observables/onErrorResumeNext-spec.ts b/spec/observables/onErrorResumeNext-spec.ts index bee293b857..0463105d3e 100644 --- a/spec/observables/onErrorResumeNext-spec.ts +++ b/spec/observables/onErrorResumeNext-spec.ts @@ -1,54 +1,49 @@ -import { onErrorResumeNext } from '../../src/'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; - -describe('onErrorResumeNext', () => { - it('should continue with observables', () => { - const s1 = hot('--a--b--#'); - const s2 = cold( '--c--d--#'); - const s3 = cold( '--e--#'); - const s4 = cold( '--f--g--|'); - const subs1 = '^ !'; - const subs2 = ' ^ !'; - const subs3 = ' ^ !'; - const subs4 = ' ^ !'; - const expected = '--a--b----c--d----e----f--g--|'; - - expectObservable(onErrorResumeNext(s1, s2, s3, s4)).toBe(expected); - expectSubscriptions(s1.subscriptions).toBe(subs1); - expectSubscriptions(s2.subscriptions).toBe(subs2); - expectSubscriptions(s3.subscriptions).toBe(subs3); - expectSubscriptions(s4.subscriptions).toBe(subs4); - }); - - it('should continue array of observables', () => { - const s1 = hot('--a--b--#'); - const s2 = cold( '--c--d--#'); - const s3 = cold( '--e--#'); - const s4 = cold( '--f--g--|'); - const subs1 = '^ !'; - const subs2 = ' ^ !'; - const subs3 = ' ^ !'; - const subs4 = ' ^ !'; - const expected = '--a--b----c--d----e----f--g--|'; - - expectObservable(onErrorResumeNext([s1, s2, s3, s4])).toBe(expected); - expectSubscriptions(s1.subscriptions).toBe(subs1); - expectSubscriptions(s2.subscriptions).toBe(subs2); - expectSubscriptions(s3.subscriptions).toBe(subs3); - expectSubscriptions(s4.subscriptions).toBe(subs4); - }); - - it('should complete single observable throws', () => { - const source = hot('#'); - const subs = '(^!)'; - const expected = '|'; - - expectObservable(onErrorResumeNext(source)).toBe(expected); - expectSubscriptions(source.subscriptions).toBe(subs); - }); -}); +import { onErrorResumeNext } from '../../src/'; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +describe('onErrorResumeNext', () => { + it('should continue with observables', () => { + const s1 = hot('--a--b--#'); + const s2 = cold( '--c--d--#'); + const s3 = cold( '--e--#'); + const s4 = cold( '--f--g--|'); + const subs1 = '^ !'; + const subs2 = ' ^ !'; + const subs3 = ' ^ !'; + const subs4 = ' ^ !'; + const expected = '--a--b----c--d----e----f--g--|'; + + expectObservable(onErrorResumeNext(s1, s2, s3, s4)).toBe(expected); + expectSubscriptions(s1.subscriptions).toBe(subs1); + expectSubscriptions(s2.subscriptions).toBe(subs2); + expectSubscriptions(s3.subscriptions).toBe(subs3); + expectSubscriptions(s4.subscriptions).toBe(subs4); + }); + + it('should continue array of observables', () => { + const s1 = hot('--a--b--#'); + const s2 = cold( '--c--d--#'); + const s3 = cold( '--e--#'); + const s4 = cold( '--f--g--|'); + const subs1 = '^ !'; + const subs2 = ' ^ !'; + const subs3 = ' ^ !'; + const subs4 = ' ^ !'; + const expected = '--a--b----c--d----e----f--g--|'; + + expectObservable(onErrorResumeNext([s1, s2, s3, s4])).toBe(expected); + expectSubscriptions(s1.subscriptions).toBe(subs1); + expectSubscriptions(s2.subscriptions).toBe(subs2); + expectSubscriptions(s3.subscriptions).toBe(subs3); + expectSubscriptions(s4.subscriptions).toBe(subs4); + }); + + it('should complete single observable throws', () => { + const source = hot('#'); + const subs = '(^!)'; + const expected = '|'; + + expectObservable(onErrorResumeNext(source)).toBe(expected); + expectSubscriptions(source.subscriptions).toBe(subs); + }); +}); diff --git a/spec/observables/pairs-spec.ts b/spec/observables/pairs-spec.ts index e088519406..f3386eceec 100644 --- a/spec/observables/pairs-spec.ts +++ b/spec/observables/pairs-spec.ts @@ -1,10 +1,10 @@ import { expect } from 'chai'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { expectObservable } from '../helpers/marble-testing'; import { TestScheduler } from '../../src/testing'; import { pairs } from '../../src/'; declare const asDiagram: any; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; + declare const rxTestScheduler: TestScheduler; describe('pairs', () => { diff --git a/spec/observables/race-spec.ts b/spec/observables/race-spec.ts index b2eaa1f7c2..839adf2abc 100644 --- a/spec/observables/race-spec.ts +++ b/spec/observables/race-spec.ts @@ -1,10 +1,5 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; const Observable = Rx.Observable; diff --git a/spec/observables/range-spec.ts b/spec/observables/range-spec.ts index 9a65cb959b..8a989ee4d7 100644 --- a/spec/observables/range-spec.ts +++ b/spec/observables/range-spec.ts @@ -3,12 +3,11 @@ import * as sinon from 'sinon'; import { Observable, asapScheduler as asap} from '../../src'; import { range } from '../../src/'; import { TestScheduler } from '../../src/testing'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { expectObservable } from '../helpers/marble-testing'; import { dispatch } from '../../src/internal/observable/range'; import { Subscriber } from '../../src/internal/Subscriber'; declare const asDiagram: any; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; declare const rxTestScheduler: TestScheduler; diff --git a/spec/observables/throwError-spec.ts b/spec/observables/throwError-spec.ts index e03a6cebe5..970253af12 100644 --- a/spec/observables/throwError-spec.ts +++ b/spec/observables/throwError-spec.ts @@ -1,10 +1,10 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import { throwError } from '../../src/'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { throwError } from '../../src/internal/observable/throwError'; +import { expectObservable } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; -declare const asDiagram: any; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; declare const rxTestScheduler: Rx.TestScheduler; /** @test {throw} */ diff --git a/spec/observables/timer-spec.ts b/spec/observables/timer-spec.ts index 9cbf25319f..a96300df62 100644 --- a/spec/observables/timer-spec.ts +++ b/spec/observables/timer-spec.ts @@ -1,12 +1,9 @@ -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { cold, expectObservable } from '../helpers/marble-testing'; import { timer, never, merge } from '../../src/'; import { TestScheduler } from '../../src/testing'; import { mergeMap } from '../../src/operators'; declare const asDiagram: any; -declare const time: typeof marbleTestingSignature.time; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const cold: typeof marbleTestingSignature.cold; declare const rxTestScheduler: TestScheduler; /** @test {timer} */ diff --git a/spec/observables/zip-spec.ts b/spec/observables/zip-spec.ts index 3f4680e499..83e47ba4a9 100644 --- a/spec/observables/zip-spec.ts +++ b/spec/observables/zip-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; declare const Symbol: any; diff --git a/spec/operators/audit-spec.ts b/spec/operators/audit-spec.ts index ebecd4cf86..b490eedc37 100644 --- a/spec/operators/audit-spec.ts +++ b/spec/operators/audit-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/auditTime-spec.ts b/spec/operators/auditTime-spec.ts index e9d53c0530..a1b558623a 100644 --- a/spec/operators/auditTime-spec.ts +++ b/spec/operators/auditTime-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/buffer-spec.ts b/spec/operators/buffer-spec.ts index c70a13fb11..9559f058b6 100644 --- a/spec/operators/buffer-spec.ts +++ b/spec/operators/buffer-spec.ts @@ -1,10 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/bufferCount-spec.ts b/spec/operators/bufferCount-spec.ts index d1a0bb4f92..ee89e44fa6 100644 --- a/spec/operators/bufferCount-spec.ts +++ b/spec/operators/bufferCount-spec.ts @@ -1,11 +1,8 @@ import * as Rx from '../../src/Rx'; import { expect } from 'chai'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/bufferTime-spec.ts b/spec/operators/bufferTime-spec.ts index b3f729e248..a6efbb7c8f 100644 --- a/spec/operators/bufferTime-spec.ts +++ b/spec/operators/bufferTime-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions, time } from '../helpers/marble-testing'; -declare const { asDiagram, time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const asDiagram: Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/bufferToggle-spec.ts b/spec/operators/bufferToggle-spec.ts index 2f54785a21..c0a606fb66 100644 --- a/spec/operators/bufferToggle-spec.ts +++ b/spec/operators/bufferToggle-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/bufferWhen-spec.ts b/spec/operators/bufferWhen-spec.ts index d42b7f0a0c..024b9d19b2 100644 --- a/spec/operators/bufferWhen-spec.ts +++ b/spec/operators/bufferWhen-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/catch-spec.ts b/spec/operators/catch-spec.ts index 13477fcfce..9ca111a869 100644 --- a/spec/operators/catch-spec.ts +++ b/spec/operators/catch-spec.ts @@ -2,13 +2,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; import * as sinon from 'sinon'; import { createObservableInputs } from '../helpers/test-helper'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestSchdeuler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/combineAll-spec.ts b/spec/operators/combineAll-spec.ts index e30227e6f9..d671002121 100644 --- a/spec/operators/combineAll-spec.ts +++ b/spec/operators/combineAll-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; const queueScheduler = Rx.Scheduler.queue; diff --git a/spec/operators/combineLatest-spec.ts b/spec/operators/combineLatest-spec.ts index b4c942c870..75a83235fd 100644 --- a/spec/operators/combineLatest-spec.ts +++ b/spec/operators/combineLatest-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/concat-spec.ts b/spec/operators/concat-spec.ts index c6d6681b29..9ed6bd8598 100644 --- a/spec/operators/concat-spec.ts +++ b/spec/operators/concat-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/concatAll-spec.ts b/spec/operators/concatAll-spec.ts index 616c395e42..78af7c36d3 100644 --- a/spec/operators/concatAll-spec.ts +++ b/spec/operators/concatAll-spec.ts @@ -1,12 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/concatMap-spec.ts b/spec/operators/concatMap-spec.ts index f0216973fd..3331781e51 100644 --- a/spec/operators/concatMap-spec.ts +++ b/spec/operators/concatMap-spec.ts @@ -1,12 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; -declare const { asDiagram }; -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 {concatMap} */ diff --git a/spec/operators/concatMapTo-spec.ts b/spec/operators/concatMapTo-spec.ts index 00fed8d222..d17dea93ca 100644 --- a/spec/operators/concatMapTo-spec.ts +++ b/spec/operators/concatMapTo-spec.ts @@ -1,12 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; -declare const { asDiagram }; -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 {concatMapTo} */ diff --git a/spec/operators/count-spec.ts b/spec/operators/count-spec.ts index afa813659e..e761e968db 100644 --- a/spec/operators/count-spec.ts +++ b/spec/operators/count-spec.ts @@ -1,12 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; -declare const { asDiagram }; -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 {count} */ diff --git a/spec/operators/debounce-spec.ts b/spec/operators/debounce-spec.ts index 8cbfa37bf7..3c782481a8 100644 --- a/spec/operators/debounce-spec.ts +++ b/spec/operators/debounce-spec.ts @@ -1,13 +1,10 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; declare const type; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; + declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/debounceTime-spec.ts b/spec/operators/debounceTime-spec.ts index 7cf54778be..a648f0ce6c 100644 --- a/spec/operators/debounceTime-spec.ts +++ b/spec/operators/debounceTime-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; import { VirtualTimeScheduler } from '../../src/internal/scheduler/VirtualTimeScheduler'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/defaultIfEmpty-spec.ts b/spec/operators/defaultIfEmpty-spec.ts index d591d64b3a..def3e92491 100644 --- a/spec/operators/defaultIfEmpty-spec.ts +++ b/spec/operators/defaultIfEmpty-spec.ts @@ -1,11 +1,8 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; -declare const { asDiagram }; -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 {defaultIfEmpty} */ diff --git a/spec/operators/delay-spec.ts b/spec/operators/delay-spec.ts index 40c4008da4..0518350efc 100644 --- a/spec/operators/delay-spec.ts +++ b/spec/operators/delay-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions, time } from '../helpers/marble-testing'; -declare const { asDiagram, time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const asDiagram: Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/delayWhen-spec.ts b/spec/operators/delayWhen-spec.ts index e666b7f95a..ce52da351e 100644 --- a/spec/operators/delayWhen-spec.ts +++ b/spec/operators/delayWhen-spec.ts @@ -1,12 +1,9 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; import { expect } from 'chai'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; + declare const rxTestScheduler: Rx.TestScheduler; /** @test {delayWhen} */ diff --git a/spec/operators/dematerialize-spec.ts b/spec/operators/dematerialize-spec.ts index 4feef72ecd..04d088e6df 100644 --- a/spec/operators/dematerialize-spec.ts +++ b/spec/operators/dematerialize-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; const Notification = Rx.Notification; diff --git a/spec/operators/distinct-spec.ts b/spec/operators/distinct-spec.ts index 8cae1d7415..512c577711 100644 --- a/spec/operators/distinct-spec.ts +++ b/spec/operators/distinct-spec.ts @@ -1,219 +1,215 @@ -import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -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 {distinct} */ -describe('Observable.prototype.distinct', () => { - it('should distinguish between values', () => { - const e1 = hot('--a--a--a--b--b--a--|'); - const e1subs = '^ !'; - const expected = '--a--------b--------|'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should distinguish between values and does not completes', () => { - const e1 = hot('--a--a--a--b--b--a-'); - const e1subs = '^ '; - const expected = '--a--------b-------'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should not completes if source never completes', () => { - const e1 = cold('-'); - const e1subs = '^'; - const expected = '-'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should not completes if source does not completes', () => { - const e1 = hot('-'); - const e1subs = '^'; - const expected = '-'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should complete if source is empty', () => { - const e1 = cold('|'); - const e1subs = '(^!)'; - const expected = '|'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should complete if source does not emit', () => { - const e1 = hot('------|'); - const e1subs = '^ !'; - const expected = '------|'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should emit if source emits single element only', () => { - const e1 = hot('--a--|'); - const e1subs = '^ !'; - const expected = '--a--|'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should emit if source is scalar', () => { - const e1 = Observable.of('a'); - const expected = '(a|)'; - - expectObservable((e1).distinct()).toBe(expected); - }); - - it('should raises error if source raises error', () => { - const e1 = hot('--a--a--#'); - const e1subs = '^ !'; - const expected = '--a-----#'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should raises error if source throws', () => { - const e1 = cold('#'); - const e1subs = '(^!)'; - const expected = '#'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should not omit if source elements are all different', () => { - const e1 = hot('--a--b--c--d--e--f--|'); - const e1subs = '^ !'; - const expected = '--a--b--c--d--e--f--|'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should allow unsubscribing early and explicitly', () => { - const e1 = hot('--a--b--b--d--a--f--|'); - const e1subs = '^ ! '; - const expected = '--a--b----- '; - const unsub = ' ! '; - - const result = (e1).distinct(); - - expectObservable(result, unsub).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should not break unsubscription chains when unsubscribed explicitly', () => { - const e1 = hot('--a--b--b--d--a--f--|'); - const e1subs = '^ ! '; - const expected = '--a--b----- '; - const unsub = ' ! '; - - const result = (e1 - .mergeMap((x: any) => Observable.of(x))) - .distinct() - .mergeMap((x: any) => Observable.of(x)); - - expectObservable(result, unsub).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should emit once if source elements are all same', () => { - const e1 = hot('--a--a--a--a--a--a--|'); - const e1subs = '^ !'; - const expected = '--a-----------------|'; - - expectObservable((e1).distinct()).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should distinguish values by key', () => { - const values = {a: 1, b: 2, c: 3, d: 4, e: 5, f: 6}; - const e1 = hot('--a--b--c--d--e--f--|', values); - const e1subs = '^ !'; - const expected = '--a--b--c-----------|'; - const selector = (value: number) => value % 3; - - expectObservable((e1).distinct(selector)).toBe(expected, values); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should raises error when selector throws', () => { - const e1 = hot('--a--b--c--d--e--f--|'); - const e1subs = '^ ! '; - const expected = '--a--b--c--# '; - const selector = (value: string) => { - if (value === 'd') { - throw new Error('d is for dumb'); - } - return value; - }; - - expectObservable((e1).distinct(selector)).toBe(expected, undefined, new Error('d is for dumb')); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should support a flushing stream', () => { - const e1 = hot('--a--b--a--b--a--b--|'); - const e1subs = '^ !'; - const e2 = hot('-----------x--------|'); - const e2subs = '^ !'; - const expected = '--a--b--------a--b--|'; - - expectObservable((e1).distinct(null, e2)).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - expectSubscriptions(e2.subscriptions).toBe(e2subs); - }); - - it('should raise error if flush raises error', () => { - const e1 = hot('--a--b--a--b--a--b--|'); - const e1subs = '^ !'; - const e2 = hot('-----------x-#'); - const e2subs = '^ !'; - const expected = '--a--b-------#'; - - expectObservable((e1).distinct(null, e2)).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - expectSubscriptions(e2.subscriptions).toBe(e2subs); - }); - - it('should unsubscribe from the flushing stream when the main stream is unsubbed', () => { - const e1 = hot('--a--b--a--b--a--b--|'); - const e1subs = '^ ! '; - const e2 = hot('-----------x--------|'); - const e2subs = '^ ! '; - const unsub = ' ! '; - const expected = '--a--b------'; - - expectObservable((e1).distinct(null, e2), unsub).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - expectSubscriptions(e2.subscriptions).toBe(e2subs); - }); - - it('should allow opting in to default comparator with flush', () => { - const e1 = hot('--a--b--a--b--a--b--|'); - const e1subs = '^ !'; - const e2 = hot('-----------x--------|'); - const e2subs = '^ !'; - const expected = '--a--b--------a--b--|'; - - expectObservable((e1).distinct(null, e2)).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - expectSubscriptions(e2.subscriptions).toBe(e2subs); - }); +import * as Rx from '../../src/Rx'; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +const Observable = Rx.Observable; + +/** @test {distinct} */ +describe('Observable.prototype.distinct', () => { + it('should distinguish between values', () => { + const e1 = hot('--a--a--a--b--b--a--|'); + const e1subs = '^ !'; + const expected = '--a--------b--------|'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should distinguish between values and does not completes', () => { + const e1 = hot('--a--a--a--b--b--a-'); + const e1subs = '^ '; + const expected = '--a--------b-------'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should not completes if source never completes', () => { + const e1 = cold('-'); + const e1subs = '^'; + const expected = '-'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should not completes if source does not completes', () => { + const e1 = hot('-'); + const e1subs = '^'; + const expected = '-'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should complete if source is empty', () => { + const e1 = cold('|'); + const e1subs = '(^!)'; + const expected = '|'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should complete if source does not emit', () => { + const e1 = hot('------|'); + const e1subs = '^ !'; + const expected = '------|'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should emit if source emits single element only', () => { + const e1 = hot('--a--|'); + const e1subs = '^ !'; + const expected = '--a--|'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should emit if source is scalar', () => { + const e1 = Observable.of('a'); + const expected = '(a|)'; + + expectObservable((e1).distinct()).toBe(expected); + }); + + it('should raises error if source raises error', () => { + const e1 = hot('--a--a--#'); + const e1subs = '^ !'; + const expected = '--a-----#'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should raises error if source throws', () => { + const e1 = cold('#'); + const e1subs = '(^!)'; + const expected = '#'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should not omit if source elements are all different', () => { + const e1 = hot('--a--b--c--d--e--f--|'); + const e1subs = '^ !'; + const expected = '--a--b--c--d--e--f--|'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should allow unsubscribing early and explicitly', () => { + const e1 = hot('--a--b--b--d--a--f--|'); + const e1subs = '^ ! '; + const expected = '--a--b----- '; + const unsub = ' ! '; + + const result = (e1).distinct(); + + expectObservable(result, unsub).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should not break unsubscription chains when unsubscribed explicitly', () => { + const e1 = hot('--a--b--b--d--a--f--|'); + const e1subs = '^ ! '; + const expected = '--a--b----- '; + const unsub = ' ! '; + + const result = (e1 + .mergeMap((x: any) => Observable.of(x))) + .distinct() + .mergeMap((x: any) => Observable.of(x)); + + expectObservable(result, unsub).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should emit once if source elements are all same', () => { + const e1 = hot('--a--a--a--a--a--a--|'); + const e1subs = '^ !'; + const expected = '--a-----------------|'; + + expectObservable((e1).distinct()).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should distinguish values by key', () => { + const values = {a: 1, b: 2, c: 3, d: 4, e: 5, f: 6}; + const e1 = hot('--a--b--c--d--e--f--|', values); + const e1subs = '^ !'; + const expected = '--a--b--c-----------|'; + const selector = (value: number) => value % 3; + + expectObservable((e1).distinct(selector)).toBe(expected, values); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should raises error when selector throws', () => { + const e1 = hot('--a--b--c--d--e--f--|'); + const e1subs = '^ ! '; + const expected = '--a--b--c--# '; + const selector = (value: string) => { + if (value === 'd') { + throw new Error('d is for dumb'); + } + return value; + }; + + expectObservable((e1).distinct(selector)).toBe(expected, undefined, new Error('d is for dumb')); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should support a flushing stream', () => { + const e1 = hot('--a--b--a--b--a--b--|'); + const e1subs = '^ !'; + const e2 = hot('-----------x--------|'); + const e2subs = '^ !'; + const expected = '--a--b--------a--b--|'; + + expectObservable((e1).distinct(null, e2)).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + expectSubscriptions(e2.subscriptions).toBe(e2subs); + }); + + it('should raise error if flush raises error', () => { + const e1 = hot('--a--b--a--b--a--b--|'); + const e1subs = '^ !'; + const e2 = hot('-----------x-#'); + const e2subs = '^ !'; + const expected = '--a--b-------#'; + + expectObservable((e1).distinct(null, e2)).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + expectSubscriptions(e2.subscriptions).toBe(e2subs); + }); + + it('should unsubscribe from the flushing stream when the main stream is unsubbed', () => { + const e1 = hot('--a--b--a--b--a--b--|'); + const e1subs = '^ ! '; + const e2 = hot('-----------x--------|'); + const e2subs = '^ ! '; + const unsub = ' ! '; + const expected = '--a--b------'; + + expectObservable((e1).distinct(null, e2), unsub).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + expectSubscriptions(e2.subscriptions).toBe(e2subs); + }); + + it('should allow opting in to default comparator with flush', () => { + const e1 = hot('--a--b--a--b--a--b--|'); + const e1subs = '^ !'; + const e2 = hot('-----------x--------|'); + const e2subs = '^ !'; + const expected = '--a--b--------a--b--|'; + + expectObservable((e1).distinct(null, e2)).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + expectSubscriptions(e2.subscriptions).toBe(e2subs); + }); }); \ No newline at end of file diff --git a/spec/operators/distinctUntilChanged-spec.ts b/spec/operators/distinctUntilChanged-spec.ts index 50875f6003..8e4d152244 100644 --- a/spec/operators/distinctUntilChanged-spec.ts +++ b/spec/operators/distinctUntilChanged-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/distinctUntilKeyChanged-spec.ts b/spec/operators/distinctUntilKeyChanged-spec.ts index 4d537298a8..b3e5edd52b 100644 --- a/spec/operators/distinctUntilKeyChanged-spec.ts +++ b/spec/operators/distinctUntilKeyChanged-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; /** @test {distinctUntilKeyChanged} */ describe('Observable.prototype.distinctUntilKeyChanged', () => { diff --git a/spec/operators/do-spec.ts b/spec/operators/do-spec.ts index 397686da83..728e889e1d 100644 --- a/spec/operators/do-spec.ts +++ b/spec/operators/do-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; const Subject = Rx.Subject; diff --git a/spec/operators/elementAt-spec.ts b/spec/operators/elementAt-spec.ts index f302ea0bd1..c14abc5055 100644 --- a/spec/operators/elementAt-spec.ts +++ b/spec/operators/elementAt-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/every-spec.ts b/spec/operators/every-spec.ts index f80a113715..169e8d2f50 100644 --- a/spec/operators/every-spec.ts +++ b/spec/operators/every-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/exhaust-spec.ts b/spec/operators/exhaust-spec.ts index cc36ffc204..48d0035813 100644 --- a/spec/operators/exhaust-spec.ts +++ b/spec/operators/exhaust-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/exhaustMap-spec.ts b/spec/operators/exhaustMap-spec.ts index 2fca97bd83..a5f9706e04 100644 --- a/spec/operators/exhaustMap-spec.ts +++ b/spec/operators/exhaustMap-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/expand-spec.ts b/spec/operators/expand-spec.ts index 49e3af0455..72d2b20c37 100644 --- a/spec/operators/expand-spec.ts +++ b/spec/operators/expand-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const Symbol: any; declare const rxTestScheduler: Rx.TestScheduler; diff --git a/spec/operators/filter-spec.ts b/spec/operators/filter-spec.ts index 83ac581e33..82d98c91fd 100644 --- a/spec/operators/filter-spec.ts +++ b/spec/operators/filter-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/finally-spec.ts b/spec/operators/finally-spec.ts index 33b3ffc206..00c5eb4223 100644 --- a/spec/operators/finally-spec.ts +++ b/spec/operators/finally-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, Symbol, type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; const Observable = Rx.Observable; diff --git a/spec/operators/find-spec.ts b/spec/operators/find-spec.ts index 6ebdcb696c..80798f8de4 100644 --- a/spec/operators/find-spec.ts +++ b/spec/operators/find-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/findIndex-spec.ts b/spec/operators/findIndex-spec.ts index dba420e589..cebea56e3b 100644 --- a/spec/operators/findIndex-spec.ts +++ b/spec/operators/findIndex-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/first-spec.ts b/spec/operators/first-spec.ts index 8e4fdedb65..c170d34ef5 100644 --- a/spec/operators/first-spec.ts +++ b/spec/operators/first-spec.ts @@ -1,11 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/groupBy-spec.ts b/spec/operators/groupBy-spec.ts index e48fe2cc1c..6790ce6922 100644 --- a/spec/operators/groupBy-spec.ts +++ b/spec/operators/groupBy-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; import { GroupedObservable } from '../../src/internal/operators/groupBy'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/ignoreElements-spec.ts b/spec/operators/ignoreElements-spec.ts index 8ab327cb7d..d49f0141f9 100644 --- a/spec/operators/ignoreElements-spec.ts +++ b/spec/operators/ignoreElements-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/isEmpty-spec.ts b/spec/operators/isEmpty-spec.ts index 262896383b..bcc66c6c0d 100644 --- a/spec/operators/isEmpty-spec.ts +++ b/spec/operators/isEmpty-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; /** @test {isEmpty} */ describe('Observable.prototype.isEmpty', () => { diff --git a/spec/operators/last-spec.ts b/spec/operators/last-spec.ts index 131b0149b0..a078eefba9 100644 --- a/spec/operators/last-spec.ts +++ b/spec/operators/last-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/map-spec.ts b/spec/operators/map-spec.ts index e296e485e4..500b257a13 100644 --- a/spec/operators/map-spec.ts +++ b/spec/operators/map-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/mapTo-spec.ts b/spec/operators/mapTo-spec.ts index 39a0e3bdec..74958e6e0d 100644 --- a/spec/operators/mapTo-spec.ts +++ b/spec/operators/mapTo-spec.ts @@ -1,12 +1,8 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/materialize-spec.ts b/spec/operators/materialize-spec.ts index fb2c95ab6a..a2daedc6f0 100644 --- a/spec/operators/materialize-spec.ts +++ b/spec/operators/materialize-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; const Notification = Rx.Notification; diff --git a/spec/operators/max-spec.ts b/spec/operators/max-spec.ts index b8f995aab8..f84400b1d4 100644 --- a/spec/operators/max-spec.ts +++ b/spec/operators/max-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/merge-spec.ts b/spec/operators/merge-spec.ts index fdcc56e823..060b40c84d 100644 --- a/spec/operators/merge-spec.ts +++ b/spec/operators/merge-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/mergeAll-spec.ts b/spec/operators/mergeAll-spec.ts index 32654a18b0..0483d79621 100644 --- a/spec/operators/mergeAll-spec.ts +++ b/spec/operators/mergeAll-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/mergeMap-spec.ts b/spec/operators/mergeMap-spec.ts index 13f3206745..b803c35d69 100644 --- a/spec/operators/mergeMap-spec.ts +++ b/spec/operators/mergeMap-spec.ts @@ -1,12 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; const Observable = Rx.Observable; diff --git a/spec/operators/mergeMapTo-spec.ts b/spec/operators/mergeMapTo-spec.ts index e83ab35f50..2c2737946d 100644 --- a/spec/operators/mergeMapTo-spec.ts +++ b/spec/operators/mergeMapTo-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { asDiagram, type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; +declare const type: Function; +declare const asDiagram: Function; const Observable = Rx.Observable; /** @test {mergeMapTo} */ diff --git a/spec/operators/mergeScan-spec.ts b/spec/operators/mergeScan-spec.ts index 90194db1ff..e26d651528 100644 --- a/spec/operators/mergeScan-spec.ts +++ b/spec/operators/mergeScan-spec.ts @@ -1,10 +1,5 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/min-spec.ts b/spec/operators/min-spec.ts index 29555ebbe3..7a1520cf69 100644 --- a/spec/operators/min-spec.ts +++ b/spec/operators/min-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/multicast-spec.ts b/spec/operators/multicast-spec.ts index 164925138c..afbd6ff019 100644 --- a/spec/operators/multicast-spec.ts +++ b/spec/operators/multicast-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { asDiagram, time, rxTestScheduler }; -declare const type; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare const type: Function; +declare const asDiagram: Function; const Observable = Rx.Observable; const Subject = Rx.Subject; diff --git a/spec/operators/observeOn-spec.ts b/spec/operators/observeOn-spec.ts index dcc181b917..9dd562632d 100644 --- a/spec/operators/observeOn-spec.ts +++ b/spec/operators/observeOn-spec.ts @@ -1,11 +1,8 @@ import * as Rx from '../../src/Rx'; import { expect } from 'chai'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/onErrorResumeNext-spec.ts b/spec/operators/onErrorResumeNext-spec.ts index 86ced33081..f3a3030031 100644 --- a/spec/operators/onErrorResumeNext-spec.ts +++ b/spec/operators/onErrorResumeNext-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/pairwise-spec.ts b/spec/operators/pairwise-spec.ts index 06c20c053a..22ed52d0de 100644 --- a/spec/operators/pairwise-spec.ts +++ b/spec/operators/pairwise-spec.ts @@ -1,10 +1,6 @@ -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; /** @test {pairwise} */ describe('Observable.prototype.pairwise', () => { diff --git a/spec/operators/partition-spec.ts b/spec/operators/partition-spec.ts index 606c6a79bd..09e2a7abc8 100644 --- a/spec/operators/partition-spec.ts +++ b/spec/operators/partition-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/pluck-spec.ts b/spec/operators/pluck-spec.ts index 391958192b..01b62cc515 100644 --- a/spec/operators/pluck-spec.ts +++ b/spec/operators/pluck-spec.ts @@ -1,11 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/publish-spec.ts b/spec/operators/publish-spec.ts index 97eb079359..9354ee76cd 100644 --- a/spec/operators/publish-spec.ts +++ b/spec/operators/publish-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; +declare function asDiagram(arg: string): Function; declare const type; -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; diff --git a/spec/operators/publishBehavior-spec.ts b/spec/operators/publishBehavior-spec.ts index c69234aee9..c6ed1d5c43 100644 --- a/spec/operators/publishBehavior-spec.ts +++ b/spec/operators/publishBehavior-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; +declare function asDiagram(arg: string): Function; declare const type; -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; diff --git a/spec/operators/publishLast-spec.ts b/spec/operators/publishLast-spec.ts index 3b37ee5c84..8d66b1ff37 100644 --- a/spec/operators/publishLast-spec.ts +++ b/spec/operators/publishLast-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; +declare function asDiagram(arg: string): Function; declare const type; -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; diff --git a/spec/operators/publishReplay-spec.ts b/spec/operators/publishReplay-spec.ts index a15c9bb88a..b0b99ae426 100644 --- a/spec/operators/publishReplay-spec.ts +++ b/spec/operators/publishReplay-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; +declare function asDiagram(arg: string): Function; declare const type; -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; diff --git a/spec/operators/race-spec.ts b/spec/operators/race-spec.ts index 24256c0e85..aa6c4e6f13 100644 --- a/spec/operators/race-spec.ts +++ b/spec/operators/race-spec.ts @@ -1,12 +1,7 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; const Observable = Rx.Observable; diff --git a/spec/operators/reduce-spec.ts b/spec/operators/reduce-spec.ts index 3ca91aac4c..7a19d9ff69 100644 --- a/spec/operators/reduce-spec.ts +++ b/spec/operators/reduce-spec.ts @@ -1,12 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; const Observable = Rx.Observable; diff --git a/spec/operators/refCount-spec.ts b/spec/operators/refCount-spec.ts index 4f88056c19..3c93fdd829 100644 --- a/spec/operators/refCount-spec.ts +++ b/spec/operators/refCount-spec.ts @@ -1,11 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/repeat-spec.ts b/spec/operators/repeat-spec.ts index aacc5d3e33..f9c18eaa9b 100644 --- a/spec/operators/repeat-spec.ts +++ b/spec/operators/repeat-spec.ts @@ -1,11 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/repeatWhen-spec.ts b/spec/operators/repeatWhen-spec.ts index 6d1cfa321e..2d450d0bd4 100644 --- a/spec/operators/repeatWhen-spec.ts +++ b/spec/operators/repeatWhen-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/retry-spec.ts b/spec/operators/retry-spec.ts index e151cdf6bd..157b4917c8 100644 --- a/spec/operators/retry-spec.ts +++ b/spec/operators/retry-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/retryWhen-spec.ts b/spec/operators/retryWhen-spec.ts index 0e8767861a..4d46b32629 100644 --- a/spec/operators/retryWhen-spec.ts +++ b/spec/operators/retryWhen-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/sample-spec.ts b/spec/operators/sample-spec.ts index b2666ccd46..911a0fd964 100644 --- a/spec/operators/sample-spec.ts +++ b/spec/operators/sample-spec.ts @@ -1,12 +1,9 @@ import * as Rx from '../../src/Rx'; import { expect } from 'chai'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/sampleTime-spec.ts b/spec/operators/sampleTime-spec.ts index c05be93d07..6462000c6d 100644 --- a/spec/operators/sampleTime-spec.ts +++ b/spec/operators/sampleTime-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/scan-spec.ts b/spec/operators/scan-spec.ts index 8966baca90..5e26f2c75f 100644 --- a/spec/operators/scan-spec.ts +++ b/spec/operators/scan-spec.ts @@ -1,12 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; const Observable = Rx.Observable; diff --git a/spec/operators/sequenceEqual-spec.ts b/spec/operators/sequenceEqual-spec.ts index 5e386bcc15..4a872eefd4 100644 --- a/spec/operators/sequenceEqual-spec.ts +++ b/spec/operators/sequenceEqual-spec.ts @@ -1,12 +1,8 @@ import * as _ from 'lodash'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { asDiagram, rxTestScheduler, time, type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, expectObservable, expectSubscriptions, time } from '../helpers/marble-testing'; +declare const type: Function; +declare const asDiagram: Function; const booleans = { T: true, F: false }; /** @test {sequenceEqual} */ diff --git a/spec/operators/share-spec.ts b/spec/operators/share-spec.ts index 499977a5bf..ff0e7a3d0c 100644 --- a/spec/operators/share-spec.ts +++ b/spec/operators/share-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/shareReplay-spec.ts b/spec/operators/shareReplay-spec.ts index 91d6d0d184..513e5ba527 100644 --- a/spec/operators/shareReplay-spec.ts +++ b/spec/operators/shareReplay-spec.ts @@ -1,14 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; -declare const time: typeof marbleTestingSignature.time; -declare const rxTestScheduler: typeof marbleTestingSignature.rxTestScheduler; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/single-spec.ts b/spec/operators/single-spec.ts index 3ff97b715d..3899a53bd7 100644 --- a/spec/operators/single-spec.ts +++ b/spec/operators/single-spec.ts @@ -1,11 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; /** @test {single} */ diff --git a/spec/operators/skip-spec.ts b/spec/operators/skip-spec.ts index 1b0a3f02c1..83d47089b4 100644 --- a/spec/operators/skip-spec.ts +++ b/spec/operators/skip-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/skipLast-spec.ts b/spec/operators/skipLast-spec.ts index ffdb61afd9..0299335210 100644 --- a/spec/operators/skipLast-spec.ts +++ b/spec/operators/skipLast-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/skipUntil-spec.ts b/spec/operators/skipUntil-spec.ts index 6b849cdeae..f44c88d325 100644 --- a/spec/operators/skipUntil-spec.ts +++ b/spec/operators/skipUntil-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/skipWhile-spec.ts b/spec/operators/skipWhile-spec.ts index 68330ed827..09129e6ff5 100644 --- a/spec/operators/skipWhile-spec.ts +++ b/spec/operators/skipWhile-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/startWith-spec.ts b/spec/operators/startWith-spec.ts index 57d0522460..b6fa6a48a3 100644 --- a/spec/operators/startWith-spec.ts +++ b/spec/operators/startWith-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/subscribeOn-spec.ts b/spec/operators/subscribeOn-spec.ts index 3924fc12eb..ad61ba73f7 100644 --- a/spec/operators/subscribeOn-spec.ts +++ b/spec/operators/subscribeOn-spec.ts @@ -1,10 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/switch-spec.ts b/spec/operators/switch-spec.ts index bcafd1d257..bf250aefcb 100644 --- a/spec/operators/switch-spec.ts +++ b/spec/operators/switch-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; const queueScheduler = Rx.Scheduler.queue; diff --git a/spec/operators/switchMap-spec.ts b/spec/operators/switchMap-spec.ts index ef9b47042d..8afab6805e 100644 --- a/spec/operators/switchMap-spec.ts +++ b/spec/operators/switchMap-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/switchMapTo-spec.ts b/spec/operators/switchMapTo-spec.ts index 1e3135002d..c0707a353d 100644 --- a/spec/operators/switchMapTo-spec.ts +++ b/spec/operators/switchMapTo-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/take-spec.ts b/spec/operators/take-spec.ts index 1f05045720..5327e79a40 100644 --- a/spec/operators/take-spec.ts +++ b/spec/operators/take-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Subject = Rx.Subject; const Observable = Rx.Observable; diff --git a/spec/operators/takeLast-spec.ts b/spec/operators/takeLast-spec.ts index 03cb72ab0a..78b40b8d8b 100644 --- a/spec/operators/takeLast-spec.ts +++ b/spec/operators/takeLast-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/takeUntil-spec.ts b/spec/operators/takeUntil-spec.ts index 0e438ef2b0..2bec8ffe55 100644 --- a/spec/operators/takeUntil-spec.ts +++ b/spec/operators/takeUntil-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/takeWhile-spec.ts b/spec/operators/takeWhile-spec.ts index 47733ea284..d458bb9b04 100644 --- a/spec/operators/takeWhile-spec.ts +++ b/spec/operators/takeWhile-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; /** @test {takeWhile} */ diff --git a/spec/operators/throttle-spec.ts b/spec/operators/throttle-spec.ts index 24210dab6b..b705df5415 100644 --- a/spec/operators/throttle-spec.ts +++ b/spec/operators/throttle-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; declare const type; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/throttleTime-spec.ts b/spec/operators/throttleTime-spec.ts index 6b8d93cb7f..b05dccf4fd 100644 --- a/spec/operators/throttleTime-spec.ts +++ b/spec/operators/throttleTime-spec.ts @@ -1,13 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; -declare const time: typeof marbleTestingSignature.time; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/timeInterval-spec.ts b/spec/operators/timeInterval-spec.ts index 2c36658239..fc9de91cde 100644 --- a/spec/operators/timeInterval-spec.ts +++ b/spec/operators/timeInterval-spec.ts @@ -1,11 +1,7 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/timeout-spec.ts b/spec/operators/timeout-spec.ts index 60e1c66107..085b446121 100644 --- a/spec/operators/timeout-spec.ts +++ b/spec/operators/timeout-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; +declare function asDiagram(arg: string): Function; 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; diff --git a/spec/operators/timeoutWith-spec.ts b/spec/operators/timeoutWith-spec.ts index ee203b6e4a..0eda1a1e1e 100644 --- a/spec/operators/timeoutWith-spec.ts +++ b/spec/operators/timeoutWith-spec.ts @@ -1,12 +1,8 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; +declare function asDiagram(arg: string): Function; 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; diff --git a/spec/operators/timestamp-spec.ts b/spec/operators/timestamp-spec.ts index b324546dae..34a09f1545 100644 --- a/spec/operators/timestamp-spec.ts +++ b/spec/operators/timestamp-spec.ts @@ -1,153 +1,149 @@ -import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; - -declare const rxTestScheduler: Rx.TestScheduler; -const Observable = Rx.Observable; - -/** @test {timestamp} */ -describe('Observable.prototype.timestamp', () => { - asDiagram('timestamp')('should record the time stamp per each source elements', () => { - const e1 = hot('-b-c-----d--e--|'); - const e1subs = '^ !'; - const expected = '-w-x-----y--z--|'; - const expectedValue = { w: 10, x: 30, y: 90, z: 120 }; - - const result = e1.timestamp(rxTestScheduler) - .map(x => x.timestamp); - - expectObservable(result).toBe(expected, expectedValue); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should record stamp if source emit elements', () => { - const e1 = hot('--a--^b--c----d---e--|'); - const e1subs = '^ !'; - const expected = '-w--x----y---z--|'; - - const expectedValue = { - w: new Rx.Timestamp('b', 10), - x: new Rx.Timestamp('c', 40), - y: new Rx.Timestamp('d', 90), - z: new Rx.Timestamp('e', 130) - }; - - expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected, expectedValue); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should completes without record stamp if source does not emits', () => { - const e1 = hot('---------|'); - const e1subs = '^ !'; - const expected = '---------|'; - - expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should complete immediately if source is empty', () => { - const e1 = cold('|'); - const e1subs = '(^!)'; - const expected = '|'; - - expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should record stamp then does not completes if source emits but not completes', () => { - const e1 = hot('-a--b--'); - const e1subs = '^ '; - const expected = '-y--z--'; - - const expectedValue = { - y: new Rx.Timestamp('a', 10), - z: new Rx.Timestamp('b', 40) - }; - - expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected, expectedValue); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should allow unsubscribing explicitly and early', () => { - const e1 = hot('-a--b-----c---d---|'); - const unsub = ' ! '; - const e1subs = '^ ! '; - const expected = '-y--z--- '; - - const expectedValue = { - y: new Rx.Timestamp('a', 10), - z: new Rx.Timestamp('b', 40) - }; - - const result = e1.timestamp(rxTestScheduler); - - expectObservable(result, unsub).toBe(expected, expectedValue); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should not break unsubscription chains when result is unsubscribed explicitly', () => { - const e1 = hot('-a--b-----c---d---|'); - const e1subs = '^ ! '; - const expected = '-y--z--- '; - const unsub = ' ! '; - - const expectedValue = { - y: new Rx.Timestamp('a', 10), - z: new Rx.Timestamp('b', 40) - }; - - const result = e1 - .mergeMap(x => Observable.of(x)) - .timestamp(rxTestScheduler) - .mergeMap(x => Observable.of(x)); - - expectObservable(result, unsub).toBe(expected, expectedValue); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should not completes if source never completes', () => { - const e1 = cold('-'); - const e1subs = '^'; - const expected = '-'; - - expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('raise error if source raises error', () => { - const e1 = hot('---#'); - const e1subs = '^ !'; - const expected = '---#'; - - expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should record stamp then raise error if source raises error after emit', () => { - const e1 = hot('-a--b--#'); - const e1subs = '^ !'; - const expected = '-y--z--#'; - - const expectedValue = { - y: new Rx.Timestamp('a', 10), - z: new Rx.Timestamp('b', 40) - }; - - expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected, expectedValue); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); - - it('should raise error if source immediately throws', () => { - const e1 = cold('#'); - const e1subs = '(^!)'; - const expected = '#'; - - expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); +import * as Rx from '../../src/Rx'; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare function asDiagram(arg: string): Function; + +declare const rxTestScheduler: Rx.TestScheduler; +const Observable = Rx.Observable; + +/** @test {timestamp} */ +describe('Observable.prototype.timestamp', () => { + asDiagram('timestamp')('should record the time stamp per each source elements', () => { + const e1 = hot('-b-c-----d--e--|'); + const e1subs = '^ !'; + const expected = '-w-x-----y--z--|'; + const expectedValue = { w: 10, x: 30, y: 90, z: 120 }; + + const result = e1.timestamp(rxTestScheduler) + .map(x => x.timestamp); + + expectObservable(result).toBe(expected, expectedValue); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should record stamp if source emit elements', () => { + const e1 = hot('--a--^b--c----d---e--|'); + const e1subs = '^ !'; + const expected = '-w--x----y---z--|'; + + const expectedValue = { + w: new Rx.Timestamp('b', 10), + x: new Rx.Timestamp('c', 40), + y: new Rx.Timestamp('d', 90), + z: new Rx.Timestamp('e', 130) + }; + + expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected, expectedValue); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should completes without record stamp if source does not emits', () => { + const e1 = hot('---------|'); + const e1subs = '^ !'; + const expected = '---------|'; + + expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should complete immediately if source is empty', () => { + const e1 = cold('|'); + const e1subs = '(^!)'; + const expected = '|'; + + expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should record stamp then does not completes if source emits but not completes', () => { + const e1 = hot('-a--b--'); + const e1subs = '^ '; + const expected = '-y--z--'; + + const expectedValue = { + y: new Rx.Timestamp('a', 10), + z: new Rx.Timestamp('b', 40) + }; + + expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected, expectedValue); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should allow unsubscribing explicitly and early', () => { + const e1 = hot('-a--b-----c---d---|'); + const unsub = ' ! '; + const e1subs = '^ ! '; + const expected = '-y--z--- '; + + const expectedValue = { + y: new Rx.Timestamp('a', 10), + z: new Rx.Timestamp('b', 40) + }; + + const result = e1.timestamp(rxTestScheduler); + + expectObservable(result, unsub).toBe(expected, expectedValue); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should not break unsubscription chains when result is unsubscribed explicitly', () => { + const e1 = hot('-a--b-----c---d---|'); + const e1subs = '^ ! '; + const expected = '-y--z--- '; + const unsub = ' ! '; + + const expectedValue = { + y: new Rx.Timestamp('a', 10), + z: new Rx.Timestamp('b', 40) + }; + + const result = e1 + .mergeMap(x => Observable.of(x)) + .timestamp(rxTestScheduler) + .mergeMap(x => Observable.of(x)); + + expectObservable(result, unsub).toBe(expected, expectedValue); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should not completes if source never completes', () => { + const e1 = cold('-'); + const e1subs = '^'; + const expected = '-'; + + expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('raise error if source raises error', () => { + const e1 = hot('---#'); + const e1subs = '^ !'; + const expected = '---#'; + + expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should record stamp then raise error if source raises error after emit', () => { + const e1 = hot('-a--b--#'); + const e1subs = '^ !'; + const expected = '-y--z--#'; + + const expectedValue = { + y: new Rx.Timestamp('a', 10), + z: new Rx.Timestamp('b', 40) + }; + + expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected, expectedValue); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); + + it('should raise error if source immediately throws', () => { + const e1 = cold('#'); + const e1subs = '(^!)'; + const expected = '#'; + + expectObservable(e1.timestamp(rxTestScheduler)).toBe(expected); + expectSubscriptions(e1.subscriptions).toBe(e1subs); + }); }); \ No newline at end of file diff --git a/spec/operators/toArray-spec.ts b/spec/operators/toArray-spec.ts index 0b91e79496..c6020cd1b6 100644 --- a/spec/operators/toArray-spec.ts +++ b/spec/operators/toArray-spec.ts @@ -1,11 +1,8 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, type }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; const Observable = Rx.Observable; diff --git a/spec/operators/window-spec.ts b/spec/operators/window-spec.ts index 312c96c854..cca46213cc 100644 --- a/spec/operators/window-spec.ts +++ b/spec/operators/window-spec.ts @@ -1,11 +1,8 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/windowCount-spec.ts b/spec/operators/windowCount-spec.ts index 8691759b82..0b158a6123 100644 --- a/spec/operators/windowCount-spec.ts +++ b/spec/operators/windowCount-spec.ts @@ -1,11 +1,8 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/windowTime-spec.ts b/spec/operators/windowTime-spec.ts index d632a65de0..59bd6af798 100644 --- a/spec/operators/windowTime-spec.ts +++ b/spec/operators/windowTime-spec.ts @@ -1,12 +1,8 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { asDiagram, time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; -declare const rxTestScheduler: Rx.TestScheduler; +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; + +declare const type: Function; +declare const asDiagram: Function; const Observable = Rx.Observable; /** @test {windowTime} */ diff --git a/spec/operators/windowToggle-spec.ts b/spec/operators/windowToggle-spec.ts index 7184a0e2b4..b655165369 100644 --- a/spec/operators/windowToggle-spec.ts +++ b/spec/operators/windowToggle-spec.ts @@ -1,12 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/windowWhen-spec.ts b/spec/operators/windowWhen-spec.ts index 5e6f0832d9..ec3a258ea5 100644 --- a/spec/operators/windowWhen-spec.ts +++ b/spec/operators/windowWhen-spec.ts @@ -1,11 +1,8 @@ import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram, time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare const type: Function; +declare const asDiagram: Function; declare const rxTestScheduler: Rx.TestScheduler; const Observable = Rx.Observable; diff --git a/spec/operators/withLatestFrom-spec.ts b/spec/operators/withLatestFrom-spec.ts index 7e98d5cc44..61fbed4b81 100644 --- a/spec/operators/withLatestFrom-spec.ts +++ b/spec/operators/withLatestFrom-spec.ts @@ -1,13 +1,9 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; import { lowerCaseO } from '../helpers/test-helper'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; const Observable = Rx.Observable; diff --git a/spec/operators/zip-spec.ts b/spec/operators/zip-spec.ts index c6d779afa5..466e86fa84 100644 --- a/spec/operators/zip-spec.ts +++ b/spec/operators/zip-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; declare const type; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; declare const Symbol: any; const Observable = Rx.Observable; diff --git a/spec/operators/zipAll-spec.ts b/spec/operators/zipAll-spec.ts index 468ae62885..a7d1ab4eeb 100644 --- a/spec/operators/zipAll-spec.ts +++ b/spec/operators/zipAll-spec.ts @@ -1,12 +1,8 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports +import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing'; -declare const { asDiagram }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +declare function asDiagram(arg: string): Function; declare const Symbol: any; const Observable = Rx.Observable; diff --git a/spec/schedulers/TestScheduler-spec.ts b/spec/schedulers/TestScheduler-spec.ts index 9ee546324f..387737f6a6 100644 --- a/spec/schedulers/TestScheduler-spec.ts +++ b/spec/schedulers/TestScheduler-spec.ts @@ -1,12 +1,6 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const cold: typeof marbleTestingSignature.cold; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; -declare const expectSubscriptions: typeof marbleTestingSignature.expectSubscriptions; +import { hot, cold, expectObservable, expectSubscriptions, time } from '../helpers/marble-testing'; declare const rxTestScheduler: Rx.TestScheduler; const Notification = Rx.Notification; diff --git a/spec/subjects/BehaviorSubject-spec.ts b/spec/subjects/BehaviorSubject-spec.ts index 638569d17b..0003d009ee 100644 --- a/spec/subjects/BehaviorSubject-spec.ts +++ b/spec/subjects/BehaviorSubject-spec.ts @@ -1,10 +1,6 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const { time }; -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; +import { hot, expectObservable } from '../helpers/marble-testing'; const BehaviorSubject = Rx.BehaviorSubject; const Observable = Rx.Observable; diff --git a/spec/subjects/ReplaySubject-spec.ts b/spec/subjects/ReplaySubject-spec.ts index c86f4ae70f..fd58be8457 100644 --- a/spec/subjects/ReplaySubject-spec.ts +++ b/spec/subjects/ReplaySubject-spec.ts @@ -1,10 +1,7 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; import { TestScheduler } from '../../src/internal/testing/TestScheduler'; -import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports - -declare const hot: typeof marbleTestingSignature.hot; -declare const expectObservable: typeof marbleTestingSignature.expectObservable; +import { hot, expectObservable } from '../helpers/marble-testing'; declare const rxTestScheduler: TestScheduler; diff --git a/spec/tsconfig.json b/spec/tsconfig.json new file mode 100644 index 0000000000..b647c7faeb --- /dev/null +++ b/spec/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "noImplicitAny": false + } +} \ No newline at end of file