refactor(EventEmitter): optional emits (#10058)
the Subject#next is optional
This commit is contained in:
parent
64fc4648b7
commit
190bcc89c1
|
@ -130,7 +130,7 @@ export class EventEmitter<T> extends Subject<T> {
|
||||||
this.__isAsync = isAsync;
|
this.__isAsync = isAsync;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit(value: T) { super.next(value); }
|
emit(value?: T) { super.next(value); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated - use .emit(value) instead
|
* @deprecated - use .emit(value) instead
|
||||||
|
|
|
@ -715,7 +715,7 @@ export declare function enableProdMode(): void;
|
||||||
export declare class EventEmitter<T> extends Subject<T> {
|
export declare class EventEmitter<T> extends Subject<T> {
|
||||||
__isAsync: boolean;
|
__isAsync: boolean;
|
||||||
constructor(isAsync?: boolean);
|
constructor(isAsync?: boolean);
|
||||||
emit(value: T): void;
|
emit(value?: T): void;
|
||||||
/** @deprecated */ next(value: any): void;
|
/** @deprecated */ next(value: any): void;
|
||||||
subscribe(generatorOrNext?: any, error?: any, complete?: any): any;
|
subscribe(generatorOrNext?: any, error?: any, complete?: any): any;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue