fix(packages): use ES modules for primary build (#11120)

This commit is contained in:
Miško Hevery
2016-08-30 18:07:40 -07:00
committed by Victor Berchet
parent 8cb1046ce9
commit 979657989b
249 changed files with 1929 additions and 1463 deletions

View File

@ -0,0 +1,14 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the platform-server/testing package.
*/
export * from './mock_backend';

View File

@ -7,17 +7,11 @@
*/
import {Injectable} from '@angular/core';
import {Connection, ConnectionBackend, ReadyState, Request, Response} from '@angular/http';
import {ReplaySubject} from 'rxjs/ReplaySubject';
import {Subject} from 'rxjs/Subject';
import {take} from 'rxjs/operator/take';
import {ReadyState} from '../src/enums';
import {isPresent} from '../src/facade/lang';
import {Connection, ConnectionBackend} from '../src/interfaces';
import {Request} from '../src/static_request';
import {Response} from '../src/static_response';
/**
*
@ -232,7 +226,7 @@ export class MockBackend implements ConnectionBackend {
* against the framework itself, not by end-users.
*/
createConnection(req: Request): MockConnection {
if (!isPresent(req) || !(req instanceof Request)) {
if (!req || !(req instanceof Request)) {
throw new Error(`createConnection requires an instance of Request, got ${req}`);
}
let connection = new MockConnection(req);