refactor: remove EventEmitter from facade (#14837)

As of right now each module has its own copy of the EventEmitter
contributing to bloat.
This commit is contained in:
Miško Hevery
2017-03-01 10:28:52 -08:00
committed by Chuck Jazdzewski
parent 728fe472f8
commit 928c5657c8
31 changed files with 41 additions and 59 deletions

View File

@ -6,15 +6,15 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Injectable, Type} from '@angular/core';
import {EventEmitter, Injectable, Type} from '@angular/core';
import {EventEmitter} from '../../facade/async';
import {stringify} from '../../facade/lang';
import {MessageBus} from './message_bus';
import {Serializer, SerializerTypes} from './serializer';
/**
* @experimental WebWorker support in Angular is experimental.
*/

View File

@ -6,9 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
import {NgZone} from '@angular/core';
import {EventEmitter, NgZone} from '@angular/core';
import {EventEmitter} from '../../facade/async';
/**

View File

@ -6,9 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Injectable, NgZone} from '@angular/core';
import {EventEmitter} from '../../facade/async';
import {EventEmitter, Injectable, NgZone} from '@angular/core';
import {MessageBus, MessageBusSink, MessageBusSource} from './message_bus';

View File

@ -6,12 +6,11 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Injectable, Type} from '@angular/core';
import {EventEmitter} from '../../facade/async';
import {EventEmitter, Injectable, Type} from '@angular/core';
import {MessageBus} from '../shared/message_bus';
import {Serializer, SerializerTypes} from '../shared/serializer';
/**
* @experimental WebWorker support in Angular is currently experimental.
*/

View File

@ -5,7 +5,7 @@
* 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
*/
import {EventEmitter} from '../../facade/async';
import {EventEmitter} from '@angular/core';
import {Serializer, SerializerTypes} from '../shared/serializer';
import {serializeEventWithTarget, serializeGenericEvent, serializeKeyboardEvent, serializeMouseEvent, serializeTransitionEvent} from './event_serializer';

View File

@ -7,10 +7,8 @@
*/
import {LocationChangeListener} from '@angular/common';
import {Injectable} from '@angular/core';
import {EventEmitter, Injectable} from '@angular/core';
import {ɵBrowserPlatformLocation as BrowserPlatformLocation} from '@angular/platform-browser';
import {EventEmitter} from '../../facade/async';
import {MessageBus} from '../shared/message_bus';
import {ROUTER_CHANNEL} from '../shared/messaging_api';
import {LocationType, Serializer, SerializerTypes} from '../shared/serializer';

View File

@ -7,9 +7,7 @@
*/
import {LocationChangeListener, PlatformLocation} from '@angular/common';
import {Injectable} from '@angular/core';
import {EventEmitter} from '../../facade/async';
import {EventEmitter, Injectable} from '@angular/core';
import {ClientMessageBroker, ClientMessageBrokerFactory, FnArg, UiArguments} from '../shared/client_message_broker';
import {MessageBus} from '../shared/message_bus';
import {ROUTER_CHANNEL} from '../shared/messaging_api';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {EventEmitter} from '../../../src/facade/async';
import {EventEmitter} from '@angular/core';
export class MockEventEmitter<T> extends EventEmitter<T> {
private _nextFns: Function[] = [];