Skip to content

Commit 190bcc8

Browse files
PatrickJSvicb
authored andcommitted
refactor(EventEmitter): optional emits (angular#10058)
the Subject#next is optional
1 parent 64fc464 commit 190bcc8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/@angular/facade/src/async.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class EventEmitter<T> extends Subject<T> {
130130
this.__isAsync = isAsync;
131131
}
132132

133-
emit(value: T) { super.next(value); }
133+
emit(value?: T) { super.next(value); }
134134

135135
/**
136136
* @deprecated - use .emit(value) instead

tools/public_api_guard/core/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ export declare function enableProdMode(): void;
715715
export declare class EventEmitter<T> extends Subject<T> {
716716
__isAsync: boolean;
717717
constructor(isAsync?: boolean);
718-
emit(value: T): void;
718+
emit(value?: T): void;
719719
/** @deprecated */ next(value: any): void;
720720
subscribe(generatorOrNext?: any, error?: any, complete?: any): any;
721721
}

0 commit comments

Comments
 (0)