refactor(EventEmitter): optional emits (#10058)

the Subject#next is optional
This commit is contained in:
PatrickJS 2016-07-22 10:19:57 -07:00 committed by Victor Berchet
parent 64fc4648b7
commit 190bcc89c1
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ export class EventEmitter<T> extends Subject<T> {
this.__isAsync = isAsync;
}
emit(value: T) { super.next(value); }
emit(value?: T) { super.next(value); }
/**
* @deprecated - use .emit(value) instead

View File

@ -715,7 +715,7 @@ export declare function enableProdMode(): void;
export declare class EventEmitter<T> extends Subject<T> {
__isAsync: boolean;
constructor(isAsync?: boolean);
emit(value: T): void;
emit(value?: T): void;
/** @deprecated */ next(value: any): void;
subscribe(generatorOrNext?: any, error?: any, complete?: any): any;
}