refactor(core): improve type for EventEmitter (#27228)

PR Close #27228
This commit is contained in:
Teamop 2018-11-22 18:07:29 +08:00 committed by Andrew Kushnir
parent 9277142d54
commit aebec4b156
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ export class EventEmitter<T> extends Subject<T> {
* @param complete When supplied, a custom handler for a completion * @param complete When supplied, a custom handler for a completion
* notification from this emitter. * notification from this emitter.
*/ */
subscribe(generatorOrNext?: any, error?: any, complete?: any): any { subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription {
let schedulerFn: (t: any) => any; let schedulerFn: (t: any) => any;
let errorFn = (err: any): any => null; let errorFn = (err: any): any => null;
let completeFn = (): any => null; let completeFn = (): any => null;

View File

@ -313,7 +313,7 @@ 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;
subscribe(generatorOrNext?: any, error?: any, complete?: any): any; subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription;
} }
export interface ExistingProvider extends ExistingSansProvider { export interface ExistingProvider extends ExistingSansProvider {