From 190bcc89c115ef1d0db898c3ced032dac25d8ae3 Mon Sep 17 00:00:00 2001 From: PatrickJS Date: Fri, 22 Jul 2016 10:19:57 -0700 Subject: [PATCH] refactor(EventEmitter): optional emits (#10058) the Subject#next is optional --- modules/@angular/facade/src/async.ts | 2 +- tools/public_api_guard/core/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/@angular/facade/src/async.ts b/modules/@angular/facade/src/async.ts index 1d502b4de4..7909d20010 100644 --- a/modules/@angular/facade/src/async.ts +++ b/modules/@angular/facade/src/async.ts @@ -130,7 +130,7 @@ export class EventEmitter extends Subject { this.__isAsync = isAsync; } - emit(value: T) { super.next(value); } + emit(value?: T) { super.next(value); } /** * @deprecated - use .emit(value) instead diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index 3a68256e3c..f5ec7385bd 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -715,7 +715,7 @@ export declare function enableProdMode(): void; export declare class EventEmitter extends Subject { __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; }