From bcd926adc5ef7db38508f53dcfcadc58e3386db5 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 13 Nov 2015 20:37:50 -0800 Subject: [PATCH] fix(http): refactor 'require' statements to 'import' declarations for Rx Looks like this is some old leftover code from the times when Rx didn't distribute typings via npm. Closes #5287 --- modules/angular2/src/http/backends/mock_backend.ts | 3 +-- modules/angular2/test/http/http_spec.ts | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/angular2/src/http/backends/mock_backend.ts b/modules/angular2/src/http/backends/mock_backend.ts index 2c888ba1a6..c3b26bfe67 100644 --- a/modules/angular2/src/http/backends/mock_backend.ts +++ b/modules/angular2/src/http/backends/mock_backend.ts @@ -5,8 +5,7 @@ import {ReadyStates} from '../enums'; import {Connection, ConnectionBackend} from '../interfaces'; import {isPresent} from 'angular2/src/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/facade/exceptions'; -var Rx = require('@reactivex/rxjs/dist/cjs/Rx'); -let {Subject, ReplaySubject} = Rx; +import {Subject, ReplaySubject} from '@reactivex/rxjs/dist/cjs/Rx'; /** * diff --git a/modules/angular2/test/http/http_spec.ts b/modules/angular2/test/http/http_spec.ts index a227b4cbe8..1c5fd71f57 100644 --- a/modules/angular2/test/http/http_spec.ts +++ b/modules/angular2/test/http/http_spec.ts @@ -29,9 +29,7 @@ import { Http, Jsonp } from 'angular2/http'; - -var Rx = require('@reactivex/rxjs/dist/cjs/Rx'); -let {Observable, Subject} = Rx; +import {Observable, Subject} from '@reactivex/rxjs/dist/cjs/Rx'; class SpyObserver extends SpyObject { onNext: Function;