Skip to content

Commit bcd926a

Browse files
committed
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
1 parent b22eddf commit bcd926a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

modules/angular2/src/http/backends/mock_backend.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import {ReadyStates} from '../enums';
55
import {Connection, ConnectionBackend} from '../interfaces';
66
import {isPresent} from 'angular2/src/facade/lang';
77
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
8-
var Rx = require('@reactivex/rxjs/dist/cjs/Rx');
9-
let {Subject, ReplaySubject} = Rx;
8+
import {Subject, ReplaySubject} from '@reactivex/rxjs/dist/cjs/Rx';
109

1110
/**
1211
*

modules/angular2/test/http/http_spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ import {
2929
Http,
3030
Jsonp
3131
} from 'angular2/http';
32-
33-
var Rx = require('@reactivex/rxjs/dist/cjs/Rx');
34-
let {Observable, Subject} = Rx;
32+
import {Observable, Subject} from '@reactivex/rxjs/dist/cjs/Rx';
3533

3634
class SpyObserver extends SpyObject {
3735
onNext: Function;

0 commit comments

Comments
 (0)