Skip to content

Commit

Permalink
fix(fromEventPattern): improve typings for fromEventPattern (#4496)
Browse files Browse the repository at this point in the history
  • Loading branch information
evertbouw authored and benlesh committed Jan 29, 2019
1 parent 065b4e3 commit 037f53d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/internal/observable/fromEventPattern.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Observable } from '../Observable';
import { isArray } from '../util/isArray';
import { isFunction } from '../util/isFunction';
import { fromEvent } from './fromEvent';
import { NodeEventHandler } from './fromEvent';
import { map } from '../operators/map';

/* tslint:disable:max-line-length */
export function fromEventPattern<T>(addHandler: (handler: Function) => any, removeHandler?: (handler: Function, signal?: any) => void): Observable<T>;
export function fromEventPattern<T>(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void): Observable<T>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export function fromEventPattern<T>(addHandler: (handler: Function) => any, removeHandler?: (handler: Function, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable<T>;
export function fromEventPattern<T>(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable<T>;
/* tslint:enable:max-line-length */

/**
Expand Down Expand Up @@ -132,8 +132,8 @@ export function fromEventPattern<T>(addHandler: (handler: Function) => any, remo
* @owner Observable
*/

export function fromEventPattern<T>(addHandler: (handler: Function) => any,
removeHandler?: (handler: Function, signal?: any) => void,
export function fromEventPattern<T>(addHandler: (handler: NodeEventHandler) => any,
removeHandler?: (handler: NodeEventHandler, signal?: any) => void,
resultSelector?: (...args: any[]) => T): Observable<T | T[]> {

if (resultSelector) {
Expand Down

0 comments on commit 037f53d

Please sign in to comment.